Skip to content

Instantly share code, notes, and snippets.

@mschnitzer
Created February 24, 2017 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mschnitzer/77cbb8a059a6d7572e40595d964f0bfc to your computer and use it in GitHub Desktop.
Save mschnitzer/77cbb8a059a6d7572e40595d964f0bfc to your computer and use it in GitHub Desktop.
import { Component, ViewChild } from '@angular/core';
import { HomePage } from '../home/home';
import { AboutPage } from '../about/about';
import { AccountPage } from '../account/account';
@Component({
templateUrl: 'tabs.html'
})
export class TabsPage {
// this tells the tabs component which Pages
// should be each tab's root Page
tab1Root: any = HomePage;
tab2Root: any = AboutPage;
tab3Root: any = AccountPage;
@ViewChild('tabBar') tabRef: any;
constructor() {
}
ionViewWillEnter() {
this.tabRef.select(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment