Is there a way to navigate back to the rootPage that is defined in the appComponent
when using tabs? I have found that the setRoot method does not function as I anticipated. When used on a Tab page, the navigation stack is not cleared. Instead of the navigation toggle and title of the tab being displayed on the 'home page', the back button is visible.
Typically, pages are cached and remain in the DOM if they are navigated away from but still in the navigation stack (such as the exiting page on a push()). They are only destroyed when removed from the navigation stack (via pop() or setRoot()).
The explanation above has led me to believe that using setRoot would clear pages from the cache. However, this appears to be accurate for normal pages but not for tabs.
In the tab page's class, there exists a function that sets the root page to home upon clicking a button.
goToHome() {
this.navCtrl.setRoot(HomePage);
}
How can I ensure that when we return to the homePage, there is no back button present, and the title specified in the HTML template of the component is utilized?