How to tell which bootstrap tab is selected in Angular-UI

前端 未结 5 2106
执笔经年
执笔经年 2020-12-23 20:26

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 upda

5条回答
  •  孤城傲影
    2020-12-23 21:12

    if you don't have a repeater, bind tabs (or spans) activity to an Array

     ...
     ...
    

    and in your controller

    $scope.tabActivity=[false,false];
    

    then you can get active tab with

    $scope.tabActivity.indexOf(true)
    

提交回复
热议问题