routerLink
noun
say it: “ROW-ter link” /ˈraʊtər lɪŋk/
An Angular directive that makes a link go to another route without reloading the page.
What does routerLink do?
routerLink turns an element into a link that navigates inside the app without reloading the page.
<a routerLink="/recipes">All recipes</a>
<a [routerLink]="['/recipes', recipe.id]">{{ recipe.title }}</a>
In a sentence
- “<a routerLink="/products"> switches pages instantly, with no reload.”
Level: Apprentice · More Angular terms at this level
Updated