how to update parent data after returning from modal in ionic4
async editstarttext(type) {
console.log(type);
const modal = await this.modalController.create({
component: ModalalertPage
});
let dataReturned;
//ondismiss parent page refresh
modal.onDidDismiss().then((modalData) => {
dataReturned = modalData.data;
console.log(dataReturned.dismissed);
this.ionViewWillEnter();
});
return await modal.present();
}
close modal
dismis(){
this.modalController.dismiss({
'dismissed': true
});
}
Comments
Post a Comment