import {App, NavController} from 'ionic/ionic';
import {Page, Config, IonicApp} from 'ionic/ionic';
import {NavParams, NavController, ViewController} from 'ionic/ionic';
@Page({
template: `
Login
`
})
export class Login {
constructor(nav: NavController) {
this.nav = nav;
}
goToAccount() {
this.nav.push(Account);
}
}
@Page({
template: `
Account Menu
`
})
export class Account {
constructor(app: IonicApp) {
this.app = app;
this.rootPage = Dashboard;
}
goToProfile() {
this.app.getComponent('account-nav').setRoot(Profile).then(() => {
this.app.getComponent('menu').close();
});
}
goToDashboard() {
this.app.getComponent('account-nav').setRoot(Dashboard).then(() => {
this.app.getComponent('menu').close();
});
}
logOut() {
this.app.getComponent('root-nav').setRoot(Login);
}
}
@Page({
template: `
Account Dashboard
Dashboard
`
})
export class Dashboard {}
@Page({
template: `
Account Profile
Profile
`
})
export class Profile {}
@App({
template: ``
})
class E2EApp {
constructor() {
this.rootPage = Login;
}
}