Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 / 3 : Show and hide ion-tab / tab dynamically

I’m currently trying to show and hide tabs on a page of mine dynamically.

My question is, how do you do that?

I tried declaring a variable in home.ts called seeTabs: boolean = false; But somehow I can’t assign it’s value to the tab. I tried doing

<ion-tab … show=seeTabs …></ion-tab>

I also tried

show=“seeTabs”, show=this.seeTabs, show=“this.seeTabs”

but nothing works. Do you have any idea how to do this? I mean I tried doing what the documentation said… https://ionicframework.com/docs/api/components/tabs/Tab/

like image 244
J. Hesters Avatar asked Dec 05 '25 14:12

J. Hesters


1 Answers

The right syntax is <ion-tab [show]="seeTabs"></ion-tab>

Hope it helps.

export class UserListPage { seeTabs ;}

ionViewDidLoad() { this.seeTabs = false;}

like image 70
Whyzx Avatar answered Dec 08 '25 08:12

Whyzx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!