1selectUser(user: User):void {
2 this.modalController.dismiss(user);
3}
4...
5async openUserModal() {
6 const modal = await this.modalCtrl.create({
7 component: UserModalComponent,
8 componentProps: { users: this.users },
9 });
10
11 modal.onDidDismiss()
12 .then((data) => {
13 const user = data['data']; // Here's your selected user!
14 });
15
16 return await modal.present();
17}