Issue
I understand that routerLink
performs internal navigation without refreshing the page.
However, if I use <a href
, does it also perform internal navigation or does it refresh the page?
Solution
Angular is a Single Page Application framework (SPA). Using href can break that design pattern.
href is is provided in HTML
, it makes navigation possible, but not through angular components, but by reloading the entire page.
routerLink is provided by angular
, and it makes it possible to navigate to a different component inside the application, without reloading the entire page.
While routerLink keeps the state of the page, href does not do so.
Answered By - vbartalis
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.