I'm using Angular-Foundation to add some tabs to a page. Some tabs have a conditional ng-if, and some do not. The tabs without ng-if seem to render first and become the default display, even though I want the other tab to render first.
Also, when the condition changes the content doesn't always change to the correct tab.
I tried using javascript to render the tabs, but unfortunately I'm using Jade for my views and the content is an include for a template, which the javascript won't render properly.
An example of the first tabset. The content will default to the Third tab while ng-if evaluates the expression.
<tabset type="navType">
<tab heading="First Tab" ng-if="!hideTab">First Content</tab>
<tab heading="Second Tab" ng-if="hideTab">Second Content</tab>
<tab heading="Third Tab">Third Content</tab>
</tabset>
Another tabset. The hack on the Third tab will let the First or Second tab and content be displayed first, but after hideTab is toggled it defaults to the Third tab again.
<tabset type="navType">
<tab heading="First Tab" ng-if="hideTab">First Content</tab>
<tab heading="Second Tab" ng-if="!hideTab">Second Content</tab>
<tab heading="Third Tab" ng-if="!hideTab || hideTab">Third Content</tab>
</tabset>
Maybe I am using tabs incorrectly?
I have created a plunker here: http://plnkr.co/edit/m1mxgo1Q872AnKaOJ5fe?p=preview