![](/img/trans.png)
[英]How to remove #anchor (location.hash) from url when linking from other page within website?
[英]remove hash from angular 8 website URL website not working if I remove simply?
我已經使用 Angular 8 https://newcondosgta.ca/#/開發了一個網站
當我開發它時,它沒有 # 哈希符號,但是當我刷新頁面時,它沒有加載並在控制台中顯示錯誤...
請建議我從 url 中刪除此標志的任何解決方案......我如何刪除它並且它會正常工作。
謝謝
使用 PathLocationStrategy 進入 app.module.ts
providers: [
// Below line is optional as default LocationStrategy is PathLocationStrategy
{provide: LocationStrategy, useClass: PathLocationStrategy} ]
問候
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.