Q:

modal controller get data on dismiss

selectUser(user: User):void {
  this.modalController.dismiss(user);
}
...
async openUserModal() {
    const modal = await this.modalCtrl.create({
      component: UserModalComponent,
      componentProps: { users: this.users },
    });

    modal.onDidDismiss()
      .then((data) => {
        const user = data['data']; // Here's your selected user!
    });

    return await modal.present();
}
1

Tags

New to Communities?

Join the community