From 66af6ff3a004fafd65e90029b956b2d79164d09c Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Sat, 27 Feb 2016 20:50:57 -0600 Subject: [PATCH] test(actionsheet): open modal from actionsheet --- .../action-sheet/test/basic/index.ts | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/ionic/components/action-sheet/test/basic/index.ts b/ionic/components/action-sheet/test/basic/index.ts index 5a745a3bc4..49949d70bd 100644 --- a/ionic/components/action-sheet/test/basic/index.ts +++ b/ionic/components/action-sheet/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, Page, ActionSheet, NavController} from 'ionic-angular'; +import {App, Page, ActionSheet, Modal, NavController, ViewController} from 'ionic-angular'; @Page({ @@ -31,9 +31,10 @@ class E2EPage { } }, { - text: 'No close', + text: 'Open Modal', handler: () => { - console.log('do not close clicked'); + let modal = Modal.create(ModalPage); + this.nav.present(modal); // returning false does not allow the actionsheet to be closed return false; @@ -90,6 +91,27 @@ class E2EPage { } +@Page({ + template: ` + + + + + Modal + + + Hi, I'm Bob, and I'm a modal. + + ` +}) +class ModalPage { + constructor(private viewCtrl: ViewController) {} + + dismiss() { + this.viewCtrl.dismiss(); + } +} + @App({ template: ''