I have an html page with multiple tabs of which one or more can be disabled based on some condition in Angular. (At least one of them will always be enabled)
<tabset>
<tab ng-disabled="vm.disableTab(1)">
<tab ng-disabled="vm.disableTab(2)">
<tab ng-disabled="vm.disableTab(3)">
</tabset>
When a user enters the page, the first tab gets focus regardless of whether or not it's disabled.
I would like it to initially focus/show the first tab that is not disabled. How would I achieve such a thing?
EDIT: plnkr: http://plnkr.co/edit/NWQDPk3DgBUpLqA0vRPw?p=preview
Need to create custom directive which will perform following activity,
Your JS directive,
Your HTML with new directive,
Update Plunker