問題描述
在Angular7中更改路線的頁面重新加載問題 (Page reload issue on changing the route in Angular7)
在我更改每條路線的應用程序中,整個頁面都會重新加載,就像我們刷新頁面時一樣。這不應該發生在改變路線上。我在 Angular2、4 5 和 6 上工作過。我以前沒有遇到過這個問題。
參考解法
方法 1:
I got the same issue when I started work with Angular. It might be possible in your HTML page
<a href="">Home</a> //Don't use this one
Instead of you use
<a class="" routerLink="/homePage" skipLocationChange>Home</a>
(by Madhavi、Gopal Meena)