docs(demos): use nav params with modal

Closes #633
This commit is contained in:
Drew Rygh
2015-11-24 10:27:10 -06:00
parent 06d7caf427
commit 9078f967f3

View File

@ -1,4 +1,4 @@
import {App, IonicApp, Animation, Modal, Platform, NavController, Page, Events} from 'ionic/ionic';
import {App, IonicApp, Animation, Modal, Platform, NavController, NavParams, Page, Events} from 'ionic/ionic';
import {forwardRef, NgFor} from 'angular2/angular2';
import * as helpers from '../../helpers';
@ -34,8 +34,10 @@ class ModalsContentPage {
constructor(
modal: Modal,
platform: Platform,
params: NavParams
) {
this.modal = modal;
this.params = params;
if (platform.is('android')) {
this.currentPlatform = 'android';
} else {
@ -74,8 +76,8 @@ class ModalsContentPage {
]
}
];
this.character = characters[this.modal._defaults.charNum];
this.character = characters[this.params.get('charNum')];
}
closeModal() {