Nav controller push on dismiss?

is there a way to do something like this just like in modal page when you can onDidDismiss() and do something when modal is closed, is there a way to do that in this scenario when someone click “return” arrow?

1 Like

There is a way. This is how I did it:

this.navCtrl.push(VehiclesPage).then(() => {
  this.navCtrl.getActive().onDidDismiss(data => {
    console.log(data);
  });
});

where navCtrl is NavController. You could also do a type check in then callback to make sure the active page is the one you expect.

3 Likes

It is working. Thank you so much.

Thankyou, worked for me!