mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(e2e): menu/basic: lazy load modal
This commit is contained in:
@@ -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 { }
|
||||
|
||||
@@ -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 {}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user