我在IIS上托管了我的AngularJS应用程序。
但在浏览网址时,它显示为http://localhost/MyApp#/login
它应该是http://localhost/MyApp/#/login
为什么会有区别?
如何解决这个问题?
同样,页面上的链接也显示错误的网址。
<ul>
<li><a href="/#/MyPage1">My Page 1</a></li>
<li><a href="/#/MyPage2">My Page 2</a></li>
<li><a href="/#/MyPage3">My Page 3</a></li>
</ul>
点击任意链接即可生成网址http://localhost/#/MyPage1
,但该网址应为http://localhost/MyApp/#/MyPage1
请建议解决方案。