在选项卡上使用 ng-if 时,如果该语句返回 true,则第二个选项卡将处于事件状态,而不是第一个选项卡。
<tabset>
<tab heading="Static title" ng-if="aaa == true">Static content</tab>
<tab heading="tab2">Content 2</tab>
</tabset>
我觉得我已经尝试了一切,但没有运气。
这是问题的示例:
http://plnkr.co/edit/Hpif920RrB6nS4AB4Mwj?p=preview
希望你们中的一些人能够帮助我!
最佳答案
尝试使用事件属性。像这样
<tabset>
<tab heading="Static title" active="aaa == true" >Static content</tab>
<tab heading="tab2">Content 2</tab>
</tabset>
关于javascript - Angular Bootstrap 选项卡 ng-if 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37250360/