Tabs not hidding when setting root

I have 2 root pages: Home and Tabs.

Home has to buttons that push other two pages: Clock and Login;

In the Login page, after the user successfuly logs in, he’s sent to the second root page: Tabs.

My tabs root has 4 tab items, similar to Facebook. The last tab has a Logout button that clears the logged user and reset the root page to Home.

This is where I get unexpected behavior: the root IS set and the Home page appears but the Tabbar is still visible.

Thanks

try this:

import { App } from 'ionic-angular';
....
constructor(public appCtrl: App) { }
....
logout(){
   this.appCtrl.getRootNav().push(HomePage, {})
}

… and cancel the back button(physical back button on android) on Home.

2 Likes

That worked as expected, thank you very much.