app.module.ts文件添加以下两行代码:
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
@NgModule({
providers: [
{ provide: LocationStrategy, useClass: HashLocationStrategy },
]
})
app.module.ts文件添加以下两行代码:
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
@NgModule({
providers: [
{ provide: LocationStrategy, useClass: HashLocationStrategy },
]
})
本文标题:Angular 6打包之后,部署到服务器后刷新404
本文链接:https://www.haomeiwen.com/subject/cvowhqtx.html
网友评论