feat(tabs): ref parent nav controllers

Closes #621
This commit is contained in:
Adam Bradley
2015-11-22 23:10:23 -06:00
parent 68ee8065c8
commit 4e01ec09a2
4 changed files with 66 additions and 43 deletions

View File

@@ -47,6 +47,7 @@ class TabsPage {
'</ion-navbar>' +
'<ion-content padding>' +
'<p><button id="goToTab1Page2" (click)="push()">Go to Tab 1, Page 2</button></p>' +
'<p><button (click)="logout()">Logout</button></p>' +
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
'</ion-content>'
@@ -59,6 +60,12 @@ class Tab1Page1 {
push() {
this.nav.push(Tab1Page2)
}
logout() {
let tabs = this.nav.parent;
let rootNav = tabs.parent;
rootNav.pop();
}
}