Angular: How to set IsActive on tab or any other bootstrap controlsive


One way of doing this would be by using ngClass directive and the $location service. In your template you could do: ng-class=”{active:isActive(‘/dashboard’)}” where isActive would be a function in a scope defined like this: myApp.controller(‘MyCtrl’, function($scope, $location) { $scope.isActive = function(route) { return route === $location.path(); } }); Here is the complete jsFiddle: http://jsfiddle.net/pkozlowski_opensource/KzAfG/ Repeating… Read More Angular: How to set IsActive on tab or any other bootstrap controlsive