I would like to get the index of the active tab in the JS side.
Here is my code:
HTML:
<uib-tabset>
<uib-tab ng-repeat="item in tabs" active="item.active" TabIndex="{{item.id}}" heading="{{item.name}}"></uib-tab>
</uib-tabset>
JS:
Category.findAll().$promise.then(function (result) {
$scope.tabs = result;
});
Here is a screenShot, to show the tabs after lunching the page:
I want to get the index: 4 or 3(TabIndex="{{item.id}}") on my js side, onchange but also when the page loads.