Vicheanak Vicheanak - 1 year ago 101
TypeScript Question

How to keep tab when pushing a new page?

When I push a new tab like this in my controller:


the tab disappears. How can I keep the tab?

Pic below:

enter image description here

When the new page comes:
enter image description here

Answer Source

You'd need to add the tabSubPages:false config in your ionicBootstrap like this:

ionicBootstrap(MyApp, [], {      

By doing that, and because that each tab has its own history stack, and NavController instances injected into children @Components of each tab will be unique to each tab, the new page will be opened inside the current tab. Please take a look at this working plunker.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download