Does anyone know how returns a simple value (or JSON
) by clicking on the nav
return button on ionic2?
I know that navParam
is able to send a value on push
, but I didn't find anything about the pop
action and connect the return nav
button to my new pop action.
There is a open feature request about back navigation with parameters.
One solution is to pass a Promise through NavParams:
Parent
new Promise((resolve, reject) => {
this.nav.push(ChildPage, {resolve: resolve});
}).then(data => {
// process data
});
Child
this.navParams.get('resolve')('some data');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With