-
-
Save mschnitzer/77cbb8a059a6d7572e40595d964f0bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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