You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i create multiple modals using modalController's create function, and do not present all of the modal. The modalController's dismiss function does not close any modals.
Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. By default, the modal controller attempts to close the most recently created modal. In this case, that is modal3.
It sounds like you want to dismiss modal, in which case you can either call the dismiss method on the modal itself, or create the modal with an ID and pass that ID into the modal controller dismiss method.
For example:
constmodal=awaitthis.modalController.create({component: ModalComponentComponent,id: 'my-modal-id'});
...
this.modalController.dismiss(undefined,undefined, 'my-modal-id);
// the other parameters allow you to specify a data object to return and a role but are both optional
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 5.0.7 ionic-angular
Current behavior:
When i create multiple modals using modalController's create function, and do not present all of the modal. The modalController's dismiss function does not close any modals.
Expected behavior:
The modal should be dismissed
Steps to reproduce:
modal-components.ts
modal-component.html
A sample application StackBlitz:
https://stackblitz.com/edit/angular-pmzd2p
The text was updated successfully, but these errors were encountered: