What are router links?

The RouterLink is a directive on the anchor tags give the router control over those elements. Since the navigation paths are fixed, you can assign string values to router-link directive as below,

<h1>Angular Router</h1>
<nav>
<a routerLink="/todosList">List of todos</a>
<a routerLink="/completed">Completed todos</a>
</nav>
<router-outlet></router-outlet>

March 12, 2022
301