Ionic 2 - How do I go back to the home page of a given tab

0

My APP works with tabs , inside these tabs I have buttons that open other pages using push , when I click on tab 2 , and click a button, it opens the normal page, there I click on tab 1 , and then I click again on tab 2 , except that instead of showing the tab 2 home page, it already comes open with the page I had clicked before.

How do I make it every time it clicks on a tab, it shows exactly the home page of that tab , and does not bring the page I visited? I tried to use this.tabRef.select(0); within tab.ts , but it double-clicks on the first click of each tab , which causes a blink on the screen leaving it blank for a few seconds by calling it twice ..

I've tried this.navCtrl.setRoot(HomePage); , but it takes the tabs off the screen because it takes HomePage as the home page.

RESOLVED Only put in the internal pages this ionViewDidLeave(){ this.navController.setRoot(/*sua pagina inicia da tab*/); }

    
asked by anonymous 02.02.2017 / 14:42

0 answers