Reputation: 123
I am trying to set second tab as an active one, unfortunately heading goes off. Is there anything i am missing?
<tabset>
<tab disabled="true">
<tab-heading><i class="fa fa-bell"></i> First tab</tab-heading>
<tab-content>
fixed tab content
</tab-content>
</tab>
<tab active="true">
<tab-heading><i class="fa fa-bell"></i> First tab</tab-heading>
<tab-content>
First content
</tab-content>
</tab>
<tab>
<tab-heading><i class="fa fa-bell"></i> Second Tab</tab-heading>
<tab-content>
Second content
</tab-content>
</tab>
</tabset>
Upvotes: 3
Views: 18553
Reputation: 353
To extend on Markus' answer, if you just want to set a tab as active (like I do for testing my site) without getting a controller involved you could to this:
<tab active="isActive" ng-init="isActive = true">
But I wouldn't recomend this in production code as ng-init should hardly ever be used.
Upvotes: 4
Reputation: 753
You can not set active to true/false. That way it cannot be changed. Bind it to a variable...
<tab active="isActive">
and set ...
$scope.isActive = true;
in your Controller.
And i think you should remove the ¸<tab-content>
's. You do not need them.
Upvotes: 12