My Ionic application first loads LoginComponent
and when user successfully logs in, loads the main TabsComponent
view which allows to switch between corresponding child views.
I am trying to make it load standalone LoginComponent
without tabbed interface, and that is not working (once switched to TabsComponent
, I cannot navigate away from tabbed interface).
I've tried following commands from under one of TabsComponent
child views:
this.navCtrl.push(LoginComponent); // Loads as a child view
this.navCtrl.setRoot(LoginComponent); // Loads as a child view
this.navCtrl.popAll(); // Error: navigation stack needs at least one root page
this.navCtrl.popTo(LoginComponent); // Error: navigation stack needs at least one root page
I've went through Ionic documentation many times but I haven't found an answer to this question. What am I missing?