How to switch between pushed pages


#1

Hi,

I am using Ionic v3, I have 2 main tabs in my application, one is for normal user, and one for an admin user

Admin user should be able to switch between the user tabs, and the admin tabs

User tabs:

Admin tabs

I am currently using the following code to switch between them

GoToMainPage() {
   this.app.getRootNav().push('UserPage');
}
GoToAdminPage() {
   this.app.getRootNav().push('AdminPage');
}

The problem is that with every navigation, I have to push a new instance which cause duplication, I want to use the same instance that was pushed in the first time.

How can I switch between two pushed pages without having to push a new instance everytime?

Thanks