Angular › Routing
How do you create a clickable link to navigate between pages using Angular's router?
BeginnerAnswer
Instead of a regular HTML anchor tag, which would cause a full page reload, Angular provides the routerLink directive that changes the current page smoothly using client side routing, while still looking and working like a normal link to the user.
<nav>
<a routerLink="/">Home</a>
<a routerLink="/about">About</a>
</nav>Real-world example A website's navigation menu uses the routerLink directive instead of regular anchor tags, so clicking between pages feels instant and smooth instead of triggering a full page reload every time.