Hi everyone,
I’m re-coding an app from v1 to v2, and I’m facing an issue : on v1 when implementing an ionic menu, the views were cached and when you get back from one to another, the page was displayed as you left it before. But on v2, some examples are showing us how to implement ion-menu : only with the NavigationController and the push method (so every time I click on a view, a new View of it is called and the previous state of the view is erased). I tried to “cache” my views manually, but it seems not working. Here is my code :
openPage(page) {
if(this.activePage != page) {
if(this.nav.indexOf(page) == -1) {
this.nav.push(page.component,{},{animate:false});
} else {
this.nav.pop({animate:false});
}
this.activePage = page;
}
}
Thanks in advance for all your answers guys !!
A dev in need