In Ionic 3 as my first root I have a loginPage. Once the user logins a modal page is shown which has several profiles for the user to pick as follows. This modal is initiated in a service called AuthService.
The user then connects to the profile they want and then is sent to the homePage. This is done in the ModalPage using the navController as follows:
constructor(public navController: NavController, public navParams: NavParams, public authService: AuthService) {
}
connect(): void {
this.navController.setRoot(HomePage);
}
My problem is I successfully am navigated to the HomePage however the menuToggle which opens the side menu does not work.
I’m guessing it is because I did a setRoot within Modal.
What would be the best way to setRoo to the HomePage within the Modal so that the menuToggle works?
Note, navController.push is not an option as I want the HomePage to be the root.
Kind of an old solution so not sure anymore what was the context, but in v3 you kind of have different stack of navigation, specially if you have an app using tab, like a root one for the tabs and then a chain of navigation for the particular tab, that might explain why this particular navCtrl was empty, but not sure, I might say something wrong, it’s been some weeks for not saying months since I began to migrate to v4