test(tabs): use setRoot to log out

This commit is contained in:
Adam Bradley
2015-11-30 23:20:48 -06:00
parent b01301b3b2
commit 54e40da9ad

View File

@ -1,6 +1,6 @@
import {RouteConfig, Location} from 'angular2/router'; import {RouteConfig, Location} from 'angular2/router';
import {App, Page, NavController, Keyboard} from 'ionic/ionic'; import {App, Page, NavController} from 'ionic/ionic';
@Page({ @Page({
@ -26,15 +26,12 @@ import {App, Page, NavController, Keyboard} from 'ionic/ionic';
` `
}) })
class SignIn { class SignIn {
constructor(nav: NavController, keyboard: Keyboard) { constructor(nav: NavController) {
this.nav = nav; this.nav = nav;
this.keyboard = keyboard;
} }
push() { push() {
setTimeout(() => { this.nav.push(TabsPage);
this.nav.push(TabsPage);
}, 1000);
} }
} }
@ -78,7 +75,7 @@ class Tab1Page1 {
logout() { logout() {
let tabs = this.nav.parent; let tabs = this.nav.parent;
let rootNav = tabs.parent; let rootNav = tabs.parent;
rootNav.pop(); rootNav.setRoot(SignIn, null, { animate: true, direction: 'back' });
} }
} }