mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
test(ngmodule): update to ngmodule
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ionicBootstrap, ActionSheetController, AlertController, ModalController, ViewController, Platform } from '../../../../../src';
|
||||
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, ActionSheetController, AlertController, ModalController, ViewController, Platform } from '../../../..';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EPage {
|
||||
export class E2EPage {
|
||||
result: string = '';
|
||||
|
||||
constructor(private actionSheetCtrl: ActionSheetController, private alertCtrl: AlertController, private modalCtrl: ModalController, private platform: Platform) {}
|
||||
constructor(public actionSheetCtrl: ActionSheetController, public alertCtrl: AlertController, public modalCtrl: ModalController, public platform: Platform) {}
|
||||
|
||||
presentActionSheet1() {
|
||||
this.result = '';
|
||||
@ -168,8 +167,9 @@ class E2EPage {
|
||||
</ion-content>
|
||||
`
|
||||
})
|
||||
class ModalPage {
|
||||
constructor(private viewCtrl: ViewController) {}
|
||||
export class ModalPage {
|
||||
|
||||
constructor(public viewCtrl: ViewController) {}
|
||||
|
||||
dismiss() {
|
||||
this.viewCtrl.dismiss();
|
||||
@ -180,8 +180,24 @@ class ModalPage {
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
class E2EApp {
|
||||
export class E2EApp {
|
||||
root = E2EPage;
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
E2EApp,
|
||||
E2EPage,
|
||||
ModalPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(E2EApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
E2EPage,
|
||||
ModalPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
Reference in New Issue
Block a user