Reputation: 2019
I'm creating some tabs in my HTML page for which Im using AngularStrap
library. I want to disable one of the tab in it.
My code :
<div bs-tabs>
<div data-title="General"> <!-- the tab which needs to be disabled -->
</div>
</div>
I tried using ng-show
, ng-disabled
and ng-if
-- But it doesn't get disabled.
Any help would be appreciated.
Upvotes: 2
Views: 453
Reputation: 492
There is now a disabled option for bs-pane (version 2.2.0 onwards)
Upvotes: 0
Reputation: 1016
This is something that has been fixed in 2.1.3.
After upgrading, 'ng-if' should be enough:
<div ng-model="tabs.activeTab" bs-tabs="">
<div ng-repeat="tab in tabs" title="{{ tab.title }}" bs-pane="" ng-if="tab.show">
<div ng-include="tab.page"></div>
</div>
</div>
Upvotes: 3