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

how to dismiss all open modals? #314

Closed
eviljoe opened this issue Mar 3, 2017 · 4 comments
Closed

how to dismiss all open modals? #314

eviljoe opened this issue Mar 3, 2017 · 4 comments

Comments

@eviljoe
Copy link

eviljoe commented Mar 3, 2017

  • I'm submitting a ...
    [ ] bug report
    [x] feature request
    [x] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    feature... maybe.

  • What is the current behavior?
    I cannot find a way to close all open modals.

  • What is the expected behavior?
    In ui-bootstrap for AngularJS 1, I was able to dismiss all modals using the dismissAll function on the $uibModalStack service.

  • What is the motivation / use case for changing the behavior?
    When the route changes, I would like to dismiss all open modals. If I don't do this, the modals will stay open and the route will change behind the modal.

  • Please tell us about your environment:

    • angluar2-modal version: 2.0.3
    • Angular version: 2.3.1
    • Browser: [ all ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
    It would be nice to have a service that I can inject that will give me access to all open modals. It could even have a convenience method for dismissAll. I see that there is already a DialogRefStack class. It would be enough to just be able to access an instance of that class using the public API.

@mikevanilla
Copy link

Any update on this problem?

@pramod-kumar-czone
Copy link

Same need here.Close all cascading modal programmatically.

@kadosh1000
Copy link

@shlomiassaf
Any updated on this issue? It's been over 5 months. even a workaround we can use for now would be great

shlomiassaf pushed a commit that referenced this issue Aug 29, 2017
shlomiassaf added a commit that referenced this issue Aug 29, 2017
@shlomiassaf
Copy link
Owner

implemented, version 4.0.0-beat.3 / 3.0.4

See demo (bootstrap / vex) for implementation

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

No branches or pull requests

5 participants