Is there a way to tell which tab that has been selected when using the Bootstrap tabs in Angular UI?
I tried watching the panes array but it deosn't seem to be updated when switching tab. Can one specify a callback function when a tab is selected?
Update with code example.
The code very much follows the example from the Angular UI bootstrap page.
Markup:
<div ng-controller="TabsDemoCtrl">
<tabs>
<pane ng-repeat="pane in panes" heading="{{pane.title}}" active="pane.active">
<div ng-include="pane.template"></div>
</pane>
</tabs>
</div>
Controller:
var TabsCtrl = function ($scope) {
$scope.panes = [
{ title:"Events list", template:"/path/to/template/events" },
{ title:"Calendar", template:"/path/to/template/calendar" }
];
};