Angular

Last Updated: 9/8/2023

RouterLinkActive

  • We use routerLinkActive to set the css class for selected links in the navigation bar
  • In navbar.component.html, If you apply active class in li, the corresponding element will be highlighted
  • Add the list of css classes to be applied when the link is active
routerLinkActive="active current" //multiple class followed by space