I would like to know how to go back to the rootPage defined in the appComponent
when using tabs. The setRoot method is not working as I expected. When it is used in a Tab page the navigation stack is not cleared. On the 'home page', the back button is visible instead of the navigation toggle and the title of the tab is shown.
By default, pages are cached and left in the DOM if they are navigated away from but still in the navigation stack (the exiting page on a push() for example). They are destroyed when removed from the navigation stack (on pop() or setRoot()).
The statement above gives me the expectation that when I use setRoot pages are cleared from the cache. This seems to be true when it is used in a normal page but not in a tab.
In the class of the tab page, there is a function that sets the root page to home when the button is clicked.
goToHome() {
this.navCtrl.setRoot(HomePage);
}
How can I make sure that when we are returned to the homePage there is no back button and the title of the home is used that is available in the HTML template of the component.