Closed
Description
Short description of the problem:
In Ionic 2 beta7 and previous.
Tabs template does not work using ngIf or ngSwitch conditions.
It only works when adding a tab but does not remove a tab when condition is false.
If the condition is met more than once multiple instances of the same tab are rendered in the dom.
Steps to reproduce:
- Start tabs project
- add ngSwitch/ngIf to tabs template
For example
<ion-tabs tabbarPlacement="bottom" [ngSwitch]="userData.profileRole">
<ion-tab tabIcon="home" [root]="home"></ion-tab>
<ion-tab tabIcon="bookmark" [root]="bookmarks"></ion-tab>
<ion-tab *ngSwitchWhen="'staff'" tabIcon="lock" [root]="admin"></ion-tab>
<ion-tab tabIcon="settings" [root]="settings"></ion-tab>
</ion-tabs>
Metadata
Metadata
Assignees
Labels
No labels