Reputation: 1
The tab view is not refreshed when I redirect from another pane by using navController.setRoot() to the TabsPage. The value in tabs.ts is updated but not reflected in the view.
Please suggest!
Here is my code
<ion-tabs>
<ion-tab [root]="tab1Root" tabIcon="md-paper"></ion-tab>
<!--<ion-tab [root]="tab1Root" tabIcon="md-paper" (ionSelect)="goToHome()"></ion-tab>-->
<ion-tab [root]="tab2Root" tabIcon="md-apps"></ion-tab>
<ion-tab *ngIf="selectedItem == 'true'" (ionSelect)="newBlog()" tabIcon="md-add-circle"></ion-tab>
</ion-tabs>
value of selectedItem is changed but but view is not updated according this changed value
Upvotes: 0
Views: 753
Reputation: 29614
Try:
*ngIf="selectedItem"
or:
*ngIf="selectedItem == true"
. without the quotes.
Giving with quotes means it is a string literal.
Upvotes: 2