mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
36 lines
773 B
TypeScript
36 lines
773 B
TypeScript
import { Component } from '@angular/core';
|
|
|
|
import { ModalController } from '@ionic/angular';
|
|
import { ModalPageToPresent } from './modal-page-to-present';
|
|
|
|
@Component({
|
|
selector: 'app-modal-page',
|
|
template: `
|
|
<ion-app>
|
|
<ion-page class="show-page">
|
|
<ion-header>
|
|
<ion-toolbar>
|
|
<ion-title>Test</ion-title>
|
|
</ion-toolbar>
|
|
</ion-header>
|
|
<ion-content padding>
|
|
<ion-button (click)="clickMe()">Open Basic Modal</ion-button>
|
|
</ion-content>
|
|
</ion-page>
|
|
</ion-app>
|
|
`
|
|
})
|
|
export class ModalPageComponent {
|
|
|
|
constructor(private modalController: ModalController) {
|
|
}
|
|
|
|
clickMe() {
|
|
const modal = this.modalController.create({
|
|
component: ModalPageToPresent
|
|
});
|
|
return modal.present();
|
|
}
|
|
|
|
}
|