I\'m trying to create a modal window, pass it an array of objects, have a user select one object from that array, and then have my modal pass back the object they\'ve select
Below code is working for me.
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();
}