I have set of three Html tabs like this :
<div class="container" ng-controller="tabCtrl">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" ng-click="toggle_over1()" href="#!home/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" ng-click="toggle_over2()" href="#!/underwriting">Underwriting</a>
</li>
<li class="nav-item">
<a class="nav-link active" ng-click="toggle_over3()" href="#!operations/">Operations</a>
</li>
</ul>
</div>
when ever I click on the tab it should get active. I am trying to implement it using angularjs. I tried to implement it in so many ways, but I couldn't achieve it. Please let me know, if there is any better.
AngularJS :
app.controller('tabCtrl',function($scope) {
$scope.toggle_over = function(id) {
// implementation part
}
});
ng-classorng-style. Add active class after clicked on tabs.toggle_over1()instead oftoggle_over(1)and also with the other two links? Guess that's a typo in your question?