2

How to do a navCtrl.setRoot(Page) without the tabs?

I foun a solution for Ionic2 but can't find it to the version 3.

this.navCtrl.setRoot(LoginPage);

2 Answers2

4
import { NavController, App } from 'ionic-angular';

constructor(public app: App){}

// On your method, add code below
this.app.getRootNav().setRoot(SigninPage)
nncl
  • 128
  • 3
  • 9
  • 1
    Please add more detail to your answer. Why does this work? What was the issue that you resolved? That makes it easier for OP and everyone in the future to understand their problem. – builder-7000 May 30 '18 at 04:22
0

To show your page without tabs you need to get root of your navCtrl by using getRootNav() method.

import { NavController, App } from 'ionic-angular';

constructor(public navCtrl: NavController, public app: App){
}

any_method(){
this.app.getRootNav(Page);
}

More details of this can be read from this documentation: Navigating from an overlay component

Alif Jamaluddin
  • 518
  • 4
  • 17