【发布时间】:2017-10-06 14:00:24
【问题描述】:
我有以下带有 angular 2 路由的网络(使用 vs 2015 作为我的 IDE)
因此,每当我想硬刷新我的页面时,我必须先进入错误页面,然后我需要输入以下网址: http://localhost:57831/index.html
有没有什么解决方案,所以每当我硬刷新时,它总是转到http://localhost:57831/index.html 而不是http://localhost:57831/index.html/search?
谢谢
【问题讨论】:
-
您还需要在服务器端处理路由,以便所有路由都转到您的默认页面。