If I have a navbar in bootstrap with the items
Home | About | Contact
How do I set the active class for each menu item when they are active? That is, how can I set class="active"
when the angular route is at
#/
for home#/about
for the about page#/contact
for the contact page
Just you'll have to add the required
active
-class with required color code.Ex:
ng-class="{'active': currentNavSelected}" ng-click="setNav"