onic 4 callback function between page ?
in ionic 3
myCallbackFunction = (_params) => {
return new Promise((resolve, reject) => {
this.test = _params;
resolve();
});
}
// push page…
functionToBeClicked() {
this.navController.push(OtherPageComponent, {
callback: this.myCallbackFunction;
});
}
// and in the other page (in this example would be “OtherPageComponent”)
ionViewWillEnter() {
this.callback = this.navParams.get(“callback”)
}
ionViewWillLeave() {
this.callback(param).then(()=>{
this.navController.pop();
});
}
** Would like to know how in ionic 4 Can’t use the navController **