I'm trying to change my active tab with a button inside the tab directive uib-tabset
, but the button is only working OUTSIDE this directive.
What am I doing wrong?
Here's the code:
<button type="button" class="btn btn-default btn-sm" ng-click="active = 0">Select first tab - exterior button</button>
<div class="tabs-container">
<uib-tabset active="active">
<uib-tab index="0" heading="tab one">
tab one
</uib-tab>
<uib-tab index="1" heading="tab two">
tab two
<button type="button" class="btn btn-default btn-sm" ng-click="active = 0">Select first tab - internal button</button>
</uib-tab>
<uib-tab index="2" heading="tab three">
tab three
</uib-tab>
</uib-tabset>
</div>