test(e2e): menu/basic: lazy load modal

This commit is contained in:
Daniel Imhoff
2017-03-06 16:52:36 -06:00
parent a1a762c0e6
commit e8f6e0134e
5 changed files with 19 additions and 6 deletions

View File

@@ -2,13 +2,11 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { Modal } from '../pages/modal/modal';
import { E2EApp } from './app.component';
@NgModule({
declarations: [
E2EApp,
Modal,
],
imports: [
BrowserModule,
@@ -18,13 +16,13 @@ import { E2EApp } from './app.component';
{ loadChildren: '../pages/page1/page1.module#Page1Module', name: 'Page1' },
{ loadChildren: '../pages/page2/page2.module#Page2Module', name: 'Page2' },
{ loadChildren: '../pages/page3/page3.module#Page3Module', name: 'Page3' },
{ loadChildren: '../components/modal/modal.module#ModalModule', name: 'Modal' },
]
})
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
Modal,
]
})
export class AppModule { }

View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { DeepLinkModule } from '../../../../../..';
import { Modal } from './modal';
@NgModule({
declarations: [
Modal,
],
imports: [
DeepLinkModule.forChild(Modal)
],
entryComponents: [
Modal,
]
})
export class ModalModule {}

View File

@@ -1,8 +1,6 @@
import { Component } from '@angular/core';
import { AlertController, ModalController, NavController } from '../../../../../..';
import { Modal } from '../modal/modal';
@Component({
templateUrl: 'page1.html'
})
@@ -25,7 +23,7 @@ export class Page1 {
}
presentModal() {
let modal = this.modalCtrl.create(Modal);
let modal = this.modalCtrl.create('Modal');
modal.present();
}