@hugovisk wrote:
Hi folks!
I’m have one modal (parent) that calls another modal on top of it (child), the behavior of the child in this scenario is:
user select an option and it returns to the parent, if the user close the child modal without choosing an option it should close the parent modal and redirect to other page.Someone knows if is there a right way of doing that?
the way I’m trying on parent modal:
async displayChild() {
const modal = await this.modalController.create({
component: ChildModalComponent
});await modal.present();
const {data} = await modal.onWillDismiss();
if (!data) {
await this.modalControler.dismiss();
}
}With this .dismiss(); call nothing happens, but if I wrap it in a setTimeOut it closes the parent modal.
Posts: 1
Participants: 1