0 votes
in Angular by

What are router links?

1 Answer

0 votes
by
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>
...