hello,anyone。I have a question about ionic3


#1

I have a project that pops up a modal box, and after selecting people, turn off the modal box and return to the data. After the data is returned, the information of these people is displayed on this page. My question is: the data is returned, and how to update the data to the page!


#2

inside your page:

let Modal = this.modalCtrl.create(SomeContentPage, {
            dateFrom someData,
          });
          Modal.onDidDismiss(data => {
            this.someVariable = data.somethingSent
          })
          Modal.present();

inside modal in your dismiss method:

dismiss(){
    this.viewCtrl.dismiss({ somethingSent: someDataFromModal });
}

#3

Thanks for your advice,but I’ve found a better way.Events