test(menu): menu with popup overlay

This commit is contained in:
Adam Bradley
2015-11-23 12:38:04 -06:00
parent 103c183190
commit a72fce0441
3 changed files with 20 additions and 4 deletions

View File

@ -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'})

View File

@ -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>

View File

@ -47,4 +47,8 @@
</ion-input> </ion-input>
</ion-card> </ion-card>
<p>
<button (click)="openPopup()">Open popup</button>
</p>
</ion-content> </ion-content>