Pass data on modal close?


Is there any way to pass some data to parent page from modal on close?


Yes you can receive the data inside the onDidDismiss like this:

let myModal = this.modalCtrl.create('MyModalPage');
myModal.onDidDismiss(data => {
  // Data is your data from the modal

Inside your Modal page you then have to pass the object inside the dismiss function like this:

this.viewCtrl.dismiss({specialData: 'whatever'});

That’s it!