routerLinkActive

noun

say it: “ROW-ter link AK-tiv” /ˈraʊtər lɪŋk ˈæktɪv/

An Angular directive that adds a CSS class to a link while its page is the one showing.

What is routerLinkActive in Angular?

routerLinkActive — A directive on a link that adds a CSS class while the link's route is the one showing, so the menu can highlight where the user is.

<a routerLink="/products" routerLinkActive="active">Products</a>

In a sentence

  • “routerLinkActive="active" highlights Products in the menu while you're on that page.”

Level: Apprentice · More Angular terms at this level

Updated