Angular 2路由删除大部分原始URL
我的ASP.NET web应用程序的子文件夹中有一个小HTML页面。URL如下所示:Angular 2路由删除大部分原始URL,angular,Angular,我的ASP.NET web应用程序的子文件夹中有一个小HTML页面。URL如下所示: https://company.com/application/folder/index.html 当我在任何浏览器中加载页面并且脚本包完成加载时,URL将更改为: http://company.com/#/home 如何保留原始URL?我本以为会看到: https://company.com/application/folder/index.html#home 您必须在index.html文件中设置hr
https://company.com/application/folder/index.html
当我在任何浏览器中加载页面并且脚本包完成加载时,URL将更改为:
http://company.com/#/home
如何保留原始URL?我本以为会看到:
https://company.com/application/folder/index.html#home
您必须在
index.html
文件中设置href
属性
<base href="/application/folder/">
但是要知道,您的所有文件都必须与此路径相关
希望这有帮助