Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all the open modal instances using the NgbModal #3627

Closed
ahadjithoma opened this issue Feb 26, 2020 · 0 comments
Closed

Get all the open modal instances using the NgbModal #3627

ahadjithoma opened this issue Feb 26, 2020 · 0 comments

Comments

@ahadjithoma
Copy link

Feature Request:

It would be nice if using the NgbModal we could get the instances of all the opened modals.
Since the service has the hasOpenModals method, i expect that getting the instances of them won't be an difficult.

What we are trying to do:

Some modal components are extending a class for additional checks whether they can be closed or not. In our app.component we are subscribing to route events and we close all modals by calling the dismissAll method but we would like to check whether those modals can be closed or not before closing them. This can be done by calling a method inside the modal component. With that said, we need the instances of all the currently opened modals.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants