Back Tab to root page when change and back


#1

Hey All, firstly sorry for my bad english.

I have two tabs A, B, at A i have a list and when i click, it open a new page C with back button, but if i change to tab B and back to A tab, the page is C and i want see A not C.

Is it posible?

Thanks :grinning:


#2

I know that you can enter a tab with:

import { NavController, Tabs } from 'ionic-angular';
....
constructor(public navCtrl: NavController {}
.....
openTab(index: number){
    let t: Tabs = this.navCtrl.parent;
    t.select(index);
  }
.....

…and i having a exactly problem like you.

A alternative that i create is go above the tabs interface with this:

import { App } from 'ionic-angular';
....
constructor(public appCtrl: App) { }
....
showPage(){
   this.appCtrl.getRootNav().push(YourPage, {})
}