有没有办法检测特定选项卡是否处于活动状态,然后在活动时将 div 隐藏在所有选项卡之外?
Plunker:https ://plnkr.co/edit/b9O9S7JxxgzhQKcKONkn?p=preview
<div class="border">
Hide me when Tab #3 is active.
</div>
<hr>
<form name="outerForm" class="tab-form-demo">
<uib-tabset active="activeForm">
<uib-tab index="0" heading="Tab #1">
<ng-form name="nestedForm">
<div class="form-group">
<label>Name</label>
<input type="text" class="form-control" required ng-model="model.name"/>
</div>
</ng-form>
</uib-tab>
<uib-tab index="1" heading="Tab #2">
Some Tab Content
</uib-tab>
<uib-tab index="2" heading="Tab #3">
More Tab Content
</uib-tab>
</uib-tabset>
</form>