mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
test(menu): menu with popup overlay
This commit is contained in:
@ -1,8 +1,20 @@
|
|||||||
import {App, IonicApp, Page, NavController} from 'ionic/ionic';
|
import {App, IonicApp, Page, NavController, Popup} from 'ionic/ionic';
|
||||||
|
|
||||||
|
|
||||||
@Page({templateUrl: 'page1.html'})
|
@Page({templateUrl: 'page1.html'})
|
||||||
class Page1 {}
|
class Page1 {
|
||||||
|
constructor(popup: Popup) {
|
||||||
|
this.popup = popup;
|
||||||
|
}
|
||||||
|
openPopup() {
|
||||||
|
this.popup.alert({
|
||||||
|
title: "New Friend!",
|
||||||
|
template: "Your friend, Obi wan Kenobi, just accepted your friend request!",
|
||||||
|
cssClass: 'my-alert'
|
||||||
|
});
|
||||||
|
console.log('openPopup');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Page({templateUrl: 'page3.html'})
|
@Page({templateUrl: 'page3.html'})
|
||||||
|
@ -45,6 +45,6 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
||||||
|
|
||||||
|
<ion-overlay></ion-overlay>
|
||||||
|
@ -47,4 +47,8 @@
|
|||||||
</ion-input>
|
</ion-input>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button (click)="openPopup()">Open popup</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
Reference in New Issue
Block a user