Tabs menu with multiple level view

Hi,

I’ve a app with a tabs menu like this:

export class TabsPage {

    page1 = Page1Page;
    page2 = Page2Page;
    page3 = Page3Page;
    page4 = Page4Page;
    page5 = Page5Page;

    constructor(private platform: Platform) {}
}

In my Page2 I’ve a form and when I confirm this form I push to a Pag2-2 (a second level). On this Page2-2 I’ve a button for going back the the page1.

This is the code of the button in Page2-2 :

exit() {
     this.navCtrl.setRoot(Page1Page);
     this.navCtrl.popToRoot();
}

If I click I go back to page1 it’s ok but if I click on page2 on Tabs the tabs is selected but the Page2 isn’t loaded, the view stay on page1. But if I click a second times the page2 is loaded.

I think my exit button isn’t the good way for going back to my page1 but I don’t know how to do…

If anyone can help me.

I’m probably not properly understanding what you’re describing, because I’m hearing that you want a a button inside a page that is hosted in a tab, and you want presses on that button to jump the user out of the tab they’re in and into another tab, without using the ordinary tab bar way of switching between tabs. That’s not what you really are wanting to do, is it?

Sorry my english isn’t really good…

I want to when I leave the Page2-2 I go back to the first page with my Tabs -> that’s OK.
But when I want to go back to my Page2 with the Tabs I’ve to click two times on tab for load the Page2 view…

But I found the solution, in my Page2-2 my method for going back to Page1 was wrong so I use this:

this.appCtrl.getRootNav().setRoot(TabsPage);

Where appCtrl is private appCtrl: App