Navigate to Page in specific Tab

Well the example from @adibbz worked perfect for me and without the need to use which I believe was bugguing @rapropos . Below is the code from the component that calls the tabs

// InappPage is my internal tabs page
loginForm() {
    this.navCtrl.setRoot(InappPage, {tabIndex: 2});
ionic -v
1 Like

Can i pass parameters with this method?:;

i tried:, {apto: 1});

but it didnt work.

Has anyone found a solution? This is really frustrating. With ionic-v1 that was no problem at all.

const tabs = this.navCtrl.parent;
  .then(() => tabs.getSelected().push(NewPostPage))
  .then(() => this.navCtrl.popToRoot());

1 Like

Guys have found the simple solution so thought to share with you may it will help some one.

import { NavController, Nav , Tabs } from ‘ionic-angular’;

constructor(public navCtrl: NavController, private nav: Nav) { = this.navCtrl.parent;

goToTab3 (){;

reply if any one facing issues.

also i have tried all the solution which is give in above comments but found few issues/difficulty

For me the following code worked:;

I have a tabbed layout with 4 tabs. I used this to redirect to the first tab after logout.
Reference: Ionic official doc for tab -


1 Like

<ion-tabs selectedIndex=“1” #myTabs>

<ion-tab [root]=“tab1Root” tabTitle=“A” tabIcon=“ios-medical-outline”></ion-tab>

<ion-tab [root]=“tab2Root” tabTitle=“B” tabIcon=“search”></ion-tab>

<ion-tab [root]=“tab3Root” tabTitle=“C” tabIcon=“ios-settings-outline”></ion-tab>


default selected tab is tab "B"

below what I want to do:

When I’m on tab “A” or tab “C” when I click on hardware back button it should redirect to tab “B” then if i again press hardware back button app should exist.

Please suggest me how I’ll do it??

Thanks in advance

sorry it’s not about the subject but please can i know which tool dis you use to make the mockups?

Hey @okobsamoht – I’m pretty sure I just used Sketch.

CARA essa é a solução perfeita!! :clap::clap::clap::clap:
Man, this is the perfect solution !! :clap::clap::clap::clap:

Thank You, It’s Worked.

you can try the following if you page child page use if not and there is no back button use this.navCtrl.setRoot(HomePage) or you can use as i used .

const tabs = this.navCtrl.parent;
tabs != null ? : this.navCtrl.setRoot(HomePage);

thanks,it’s working :grinning: :grinning: