To set an active class in your bootstrap navbar, you can use ng-controller(NavigationController) to set 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.
Below example implements the above approach:
Example: This example explain how to set bootstrap navbar active class with AngularJS using ng-controller.
- How to add active class on click event in custom list group in Bootstrap 4 ?
- How to align navbar items to the right in Bootstrap 4 ?
- How to Align Navbar Items to Center using Bootstrap 4 ?
- How to design full width dropdown Navbar using Bootstrap ?
- How to Align navbar logo to the left screen using Bootstrap ?
- How to determine active route in AngularJS ?
- How to remove active nav-tab when click outside of nav-tab in Bootstrap ?
- Include Bootstrap in AngularJS using ng-bootstrap
- Difference between Bootstrap and AngularJS
- AngularJS | angular.bootstrap() Function
- AngularJS | ng-class Directive
- AngularJS | ng-class-odd Directive
- AngularJS | ng-class-even Directive
- Bootstrap | figure class with Examples
- How to use grid-breakpoint class in Bootstrap ?
- How to use links on card-img-overlay class in Bootstrap 4 ?
- Image Replacement in Bootstrap using text-hide Class
- How to create Animated Blur Navbar using CSS?
- How to create an Affix or sticky Navbar ?
- How to set sticky navbar only for first section of page?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.