import {Component, View, Injectable, CSSClass, NgIf, NgFor} from 'angular2/angular2'; import {Overlay} from '../overlay/overlay'; import {Animation} from '../../animations/animation'; import * as util from 'ionic/util'; @Injectable() export class Popup extends Overlay { alert(context={}) { if(typeof context === 'string') { context = { text: context, buttons: [ { text: 'Ok' } ] } } let defaults = { enterAnimation: 'modal-slide-in', leaveAnimation: 'modal-slide-out', }; return this.create(OVERLAY_TYPE, AlertType, util.extend(defaults, opts), context); } get(handle) { if (handle) { return this.getByHandle(handle, OVERLAY_TYPE); } return this.getByType(OVERLAY_TYPE); } } const OVERLAY_TYPE = 'popup'; @Component({ selector: 'ion-popup-alert' }) @View({ template: '