From baf9e1c4e465a146150997e8788e46dee017d978 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Thu, 28 May 2015 17:21:32 -0500 Subject: [PATCH] MODAL MODAL --- ionic/components/modal/modal.js | 45 ++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/ionic/components/modal/modal.js b/ionic/components/modal/modal.js index ea409a8a3e..30c25d453b 100644 --- a/ionic/components/modal/modal.js +++ b/ionic/components/modal/modal.js @@ -7,7 +7,7 @@ import {Nav} from 'ionic/ionic'; import {raf, ready} from 'ionic/util/dom' -import {NavController, NavbarTemplate, Navbar, Content} from 'ionic/ionic'; +import {NavController, NavParams, NavbarTemplate, Navbar, Content} from 'ionic/ionic'; @Component({ selector: 'ion-modal-wrapper' @@ -117,5 +117,48 @@ export class ModalFirstPage { } push() { + this.nav.push(ModalSecondPage, { id: 8675309, myData: [1,2,3,4] }, { animation: 'ios' }); } } + +@Component({selector: 'ion-view'}) +@View({ + template: ` + Second Page Header + + + +

+ +

+ +

+ +

+ + + + +
+ `, + directives: [NavbarTemplate, Navbar, Content] +}) +export class ModalSecondPage { + constructor( + nav: NavController, + params: NavParams + ) { + this.nav = nav; + this.params = params; + + console.log('Second page params:', params); + } + + pop() { + this.nav.pop(); + } + + push() { + } + +}