2016-08-14 83 views
1

後增加了額外的斜線網址當訪問http://localhost:3000/main例如,在頁面加載之後,IE增加了額外的斜線:http://localhost:3000///main/ 所以當我刷新頁面後,我得到一個錯誤:Angular2 IE的基本路徑

EXCEPTION: Error: Uncaught (in promise): Error: Cannot match any routes: '/main'

有沒有辦法在IE中配置此路徑? Chrome在沒有更改網址的情況下運行良好。另外,Firefox 43也很奇怪,因爲它在刷新頁面後添加/ \(http://localhost:3000/ \ main /)

+0

是否有您遇到此問題的Internet Explorer的特定版本? – rdgd

+0

Microsoft Edge 20 –

+0

或Microsoft Internet Explorer 11 –

回答

0

這個問題的原因是我在index.html基本標籤上使用了「\」而不是「/」 。

這是很好的標籤定義: <base href="/"/>