首页 > 其他 > 详细

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

时间:2019-03-25 16:53:25      阅读:150      评论:0      收藏:0      [点我收藏+]

https://stackoverflow.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 })],

 

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

原文:https://www.cnblogs.com/lishidefengchen/p/10594606.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!