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

前端 未结 5 2094
执笔经年
执笔经年 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 20:55

    My answer is for the case you place manually the tab and you are using the angular ui boostrap library, you could use the select attribute

    
      
        a
        
    a
    b
    b

    in the showTab function passing in select attribute, you can check whether your tab is selected by their name like in my case.

    The full example is here from angular ui, notice the select:

提交回复
热议问题