m-e-conroy / angular-dialog-service

A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap and Twitter Bootstrap
MIT License
618 stars 228 forks source link

close all dialogs at once #125

Closed programming-kid closed 9 years ago

programming-kid commented 9 years ago

there has to be a global function closeAll() to close all open dialogs at once

thanks

niemyjski commented 9 years ago

When would you ever have more than one modal dialog open at a time?

niemyjski commented 9 years ago

You could also wire/fire an event to close the dialogs.

dougmoscrop commented 9 years ago

I'd also argue that stuff like this can easy be considered an additional library/module - you're getting in to "window manager" territory here, and that's baggage that people should opt in to and not have to pull in every time they want to present a dialog.

niemyjski commented 9 years ago

I agree

dlwhiteman commented 9 years ago

How would one create an event to close the dialogs? Where do I find a handle for open dialogs? I think I have a similar situation as the original poster, where when connectivity is restored, I want to close the dialogs that have been opened indicating the connection is down.

dougmoscrop commented 9 years ago

Why can't you keep that handle yourself in whatever spot is responsible for detecting a connectivity problem and raising the dialog?