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

Popular posts from this blog

how to split array as per fixed length, and ionic two dates differences in min,seconds,hours

How to Add Firebase Analytics to Your NativeScript Mobile App