-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dismiss all option in modal service #1963
Comments
This doesn't solve the problem. I still need NgbModalRef to be able to close it. |
This would be a nice feature to have. My reason for needing this is that if the user is automatically logged/timed out then modals are left open on screen although the page has rerouted to the login screen. If the modalService could cache all the NgbModalRef's on a call to open (& also clear them when the modal is closed/dismissed) then can we get a function on the modalService to closeAllActiveModals? My current workaround is having to wrap every call in my app that opens a modal to also store the NgbModalRef in another app wide service array. Then I have a function to attempt to close all modals in the array when the user is logged out. |
+1 |
+10000 |
Is this feature planned for some release? |
+1 |
Feature request:
I think there should be an option to dismiss all instances.
For example let's imagine that we have http interceptor which redirects on 401 http error code to login page. From interceptor prespective we don't have infromation about current modal reference. After redirection modal stays opened. It would be nice to be able to close all instances without explicit reference to modal template.
If I'm missing something, and that feature already exists please point me to docs, cause I coulnd't find it.
The text was updated successfully, but these errors were encountered: