在IIS上托管后,SPA网址会出现问题

时间:2015-08-11 05:40:44

标签: iis single-page-application

我正在使用AngularJs开发单页面应用程序。

我已经在IIS上托管了我的应用程序。

在部署应用程序时,我将别名命名为"UI"

现在,当我浏览应用程序时,它会生成以下网址

http://localhost/UI#/login但应该是http://localhost/UI/#/login

我的应用程序中还有页面链接。

e.g。

<ul>
    <li><a href="/#/Page1">Page 1</a></li>
    <li><a href="/#/Page2">Page 2</a></li>
    <li><a href="/#/Page3">Page 3</a></li>
</ul>

当我点击任意链接时,它会生成此网址http://localhost/#/Page1,但应该是http://localhost/UI/#/Page1

有人可以告诉我如何解决这个问题吗?

0 个答案:

没有答案