For a router link to get an "active" CSS class when the link's route is active, you can use the ________ directive.

  • [activeLink]
  • [routerDirective]
  • [routerLinkActive]
  • [routerStyle]
To ensure that a router link receives an "active" CSS class when its associated route is active, you can use the [routerLinkActive] directive in Angular. This directive allows you to define CSS classes that should be applied when the link's route is active, providing visual feedback to users.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *