Files
Brandy Carney c8c90572bc chore(scripts): update e2e prod build to work with ionic-app-scripts (#10083)
* chore(e2e): WIP to add files needed for app-scripts

* chore(e2e): WIP one e2e test building but with errors

* chore(e2e): move e2e.prod to working with app-scripts

move shared functions into util, add support for debug flag when
running e2e.prod / demos.prod which gets passed to app-scripts

* chore(build): fix app-scripts build for all e2e and demos

* chore(e2e): update ionic-angular import path

* chore(build): update dev paths to work with prod

* chore(e2e): get watch working with e2e prod

* docs(scripts): update README for running e2e and demos

closes #8411
closes #10023
2017-01-19 11:09:57 -05:00

72 lines
1.3 KiB
TypeScript

import { Component, ViewChild, NgModule } from '@angular/core';
import { IonicApp, IonicModule, App, MenuController, Nav } from '../../../../../ionic-angular';
@Component({
templateUrl: 'page1.html'
})
export class Page1 {
}
@Component({
templateUrl: 'page2.html'
})
export class Page2 {
}
@Component({
templateUrl: 'main.html'
})
export class E2EApp {
@ViewChild(Nav) nav: Nav;
activeMenu: string;
page1 = Page1;
page2 = Page2;
rootPage = Page1;
constructor(public app: App, public menuCtrl: MenuController) {
this.menu1Active();
}
openPage(p: any) {
// Get the <ion-nav> by id
this.nav.setRoot(p);
}
menu1Active() {
this.menuCtrl.enable(true, 'menu1');
this.menuCtrl.enable(false, 'menu2');
this.menuCtrl.enable(false, 'menu3');
}
menu2Active() {
this.menuCtrl.enable(false, 'menu1');
this.menuCtrl.enable(true, 'menu2');
this.menuCtrl.enable(false, 'menu3');
}
menu3Active() {
this.menuCtrl.enable(false, 'menu1');
this.menuCtrl.enable(false, 'menu2');
this.menuCtrl.enable(true, 'menu3');
}
}
@NgModule({
declarations: [
E2EApp,
Page1,
Page2
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
Page1,
Page2
]
})
export class AppModule {}