-
Notifications
You must be signed in to change notification settings - Fork 133
Closing any modal instances currently opened? #161
Comments
Not currently, no. But I'm working on an updated version and it will include this feature. In the mean time you can create your own service that tracks any modals you use and simply loops through them and calls dismiss when needed. |
What you can do awaiting a such functionality is to store all your modal instances in a service and make a |
@maximelafarie that's how i'm implementing it 👍 |
We implemented a workaround to pass the currently opened "modal name" to our service component, store that info, and close that specific modal instance when needed (the assumption is only one modal is open at a time). The only downside is we must keep naming convention consistent when creating the modal html.
and in our
Now we can call |
I have multiple modal instances defined throughout multiple components within a single page. Is there a way to close any modal instance that is currently opened?
I tried declaring a global
ModalComponent
in theapp.component.ts
file and use the.close()
function. Something like:The text was updated successfully, but these errors were encountered: