📅  最后修改于: 2022-03-11 15:02:02.196000             🧑  作者: Mango
import { LocationStrategy, HashLocationStrategy} from '@angular/common';
@NgModule({
...
],
providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy }]
})