When the user views the first screen for the first time, they are sent there via this.nav.setRoot (Page). This presents a problem when I have three other options for setting pages per page. For example, I go to the home page, which is configured as root, so the source data is loaded initially for the first time. Then the user goes to the message page. Then the user returns to the home page, the data is downloaded again. I do not want this to happen. I would only like to call it once, but due to setRoot it refreshes the page. Just like navCtrl.push (Page) and .pop, data is not updated. I have a hamburger navigation style, and so I have many roots for every page in hamburger navigation.
app.comp.ts
openPage() {
this.nav.setRoot(Page);
}
openPageTwo() {
this.nav.setRoot(MessagesPage);
}
How to override nav.setRoot update? Or use something else?
thank
source
share