mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
overlay getByHandle
This commit is contained in:
@@ -43,7 +43,8 @@ class IonicApp {
|
||||
openModal() {
|
||||
Modal.open(ContactModal, {
|
||||
enterAnimation: 'my-fade-in',
|
||||
leaveAnimation: 'my-fade-out'
|
||||
leaveAnimation: 'my-fade-out',
|
||||
handle: 'my-awesome-modal'
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -72,6 +73,9 @@ export class ContactModal extends Modal {
|
||||
<p>
|
||||
<button primary (click)="openActionMenu()">Open Action Menu</button>
|
||||
</p>
|
||||
<p>
|
||||
<button primary (click)="closeByHandeModal()">Close By Handle</button>
|
||||
</p>
|
||||
<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>
|
||||
<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>
|
||||
</ion-content>
|
||||
@@ -94,6 +98,11 @@ export class ModalFirstPage {
|
||||
modal.close();
|
||||
}
|
||||
|
||||
closeByHandeModal() {
|
||||
let modal = Modal.getByHandle('my-awesome-modal');
|
||||
modal.close();
|
||||
}
|
||||
|
||||
openActionMenu() {
|
||||
ActionMenu.open({
|
||||
buttons: [
|
||||
|
||||
Reference in New Issue
Block a user