angluar opens the historical routing LocationStrategy mode

Original link: https://www.mqllin.cn/archives/193.html

“`

import { LocationStrategy, HashLocationStrategy } from ‘@angular/common’;

// Add configuration

providers: [

{provide: LocationStrategy, useClass: HashLocationStrategy},

],

“`

After enabling the route with `#`

This article is transferred from: https://www.mqllin.cn/archives/193.html
This site is only for collection, and the copyright belongs to the original author.