IONIC 4 - modal events

IONIC 4 - How to use modal events (ionModalDidDismiss)?

  async presentModal() {
    const modal = await this.modalController.create({
      component: AddTaskModalComponent,
      componentProps: {  }
    });
    modal.onDidDismiss().then((d: any) => this.handleModalDismiss(d));
    return await modal.present();
  }
5 Likes

Thank you, it worked.