ng-if is not working on tabs or tab-item
When i try to hide a tab the tabs are somehow broken if the hidden tab gets visible. The hidden tab will show up at the end, not at its defined position. (ng-show is also not working)
I think I see what you mean.
This is why we still need a separate element for tab navigation. We've gone over this like three times and decided against it, but problems keep coming up!
@adamdbradley @mlynch we could do a backwards-compatible change and just deprecate all of the attributes on ion-tab?
The below is verbose, but literally 100% flexible and allows people to do anything they want. The current way does not.
<ion-tab>
<ion-tab-nav ng-if="shouldShow()">
Tab Title
</ion-tab-nav>
<ion-tab-content>
Tab Content
<ion-tab-content>
</ion-tab>
Yes we've been over this numerous times, but we had reasons and agreed not to do ionTabNav, but I've already forgotten why (We should document the reasons for not doing so). If I recall the added elements made things much more confusing and really didn't solve any issues.
We've been over it a few times, but it does keep coming up.
We ditched it because it seemed too verbose/ugly - but verbose is not always bad if it affords the developer more power.
We should open a document to figure it out.
I got the order to remain the same by using ng-if="true" on the other tabs (the ones you aren't hiding) but I'm not sure if it's a work around for the other problems.
Moving feature requests from GH Issues to Trello. Please continue the discussion and vote for this and other issues that are important to you
https://trello.com/b/nNk2Yq1k/ionic-framework
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.