Angular 2: 404 error occur when I refresh through the browser [duplicate]

https://*.com/questions/35284988/angular-2-404-error-occur-when-i-refresh-through-the-browser

#前端#

修改app.module.ts

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

providers: [
  { provide: LocationStrategy, useClass: HashLocationStrategy }
],

修改root-routing.module.ts

imports: [RouterModule.forRoot(routes, { useHash: true })],

 

上一篇:解决使用Microsoft Graph OAuth获取令牌时,没有refresh_token的问题


下一篇:实现SpringCloud Config 客户端自动刷新