title: get index of active tab
body: <p>I would like to get the index of the active tab in the JS side.</p>
  
  <p>Here is my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;uib-tabset&gt;
     &lt;uib-tab ng-repeat="item in tabs" active="item.active" TabIndex="{{item.id}}" heading="{{item.name}}"&gt;&lt;/uib-tab&gt;
  &lt;/uib-tabset&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>Category.findAll().$promise.then(function (result) {
        $scope.tabs = result;
      }); 
  </code></pre>
  
  <p>Here is a screenShot, to show the tabs after lunching the page:</p>
  
  <p><a href="https://i.stack.imgur.com/R6Wpi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R6Wpi.png" alt="index"></a></p>
  
  <p>I want to get the index: 4 or 3(TabIndex="{{item.id}}") on my js side, onchange but also when the page loads.</p>