VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/how-to-set-navbar-active-class-with-bootstrap-and-angularjs/

⇱ How to Set navbar active class with Bootstrap and AngularJS ? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Set navbar active class with Bootstrap and AngularJS ?

Last Updated : 12 Jul, 2025

In this article, we will see how to set the navbar active class with Bootstrap and AngularJS, & will know its implementation through the example. To accomplish this task, you can use ng-controller(NavigationController) to set the bootstrap navbar active class with AngularJS. To run a single controller outside ng-view. You can set class= "active" when the angular route is clicked. The below example implements the above approach.

 

Example: This example explains how to set bootstrap navbar active class with AngularJS using ng-controller. 

Output:

👁 Image

Comment

Explore