以前,我html5mode在我的平均堆栈网站中使用过,现在由于某些原因我想禁用它,所以我$locationProvider.html5Mode(true)在我的代码中注释并仍然保留<base href="/1/" />在index.html.
结果,https://localhost:3000/1/#/home在浏览器中工作。
但是,单击由以下 html 定义的按钮会导致https://localhost:3000/1/edit/,而不是https://localhost:3000/1/#/edit/。
<li><a href="edit/" target="_self">New</a></li>
有谁知道如何修改 html 以使其打开https://localhost:3000/1/#/edit/?