ionic 4 callback function between page

onic 4 callback function between page ?

in ionic 3

myCallbackFunction = (_params) => {
return new Promise((resolve, reject) => {
this.test = _params;

// 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() {

** Would like to know how in ionic 4 Can’t use the navController **

Welcome to the forums. This sort of question comes up rather frequently, and my rather strong recommendation is to rethink your design so that you don’t have to do this, because it makes your app extremely hard to read, maintain, test, and expand.

For more background and some concrete suggestions on how to do this in a more sustainable fashion, see this thread and then maybe this one.