Navigating between Tabs in Rc0

I am unable to get my head around the Tabbed navigation in Ionic 2.

Here is a use case, working with the Tabs template. I have an button on the about tab clicking the button i want to navigate to the home tab.
This also need to happen on the hardware back button.

Using the navCtrl.pop() does not work.
Here is the code:

About.html

<ion-header>
  <ion-navbar>
    <ion-title>
      About
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
<button ion-button color="secondary" (click)="goingBack()">Secondary</button>
</ion-content>

About.ts

import { Component} from '@angular/core';
import { NavController,Tabs } from 'ionic-angular';

@Component({
  selector: 'page-about',
  templateUrl: 'about.html'
})
export class AboutPage {
  constructor(public navCtrl: NavController) {

  }

  goingBack(){
 //go to home tab
     this.navCtrl.popToRoot();
     }
}
1 Like

try this solution

1 Like