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

UI-Router detection #277

Merged
merged 3 commits into from
Jul 14, 2015
Merged

UI-Router detection #277

merged 3 commits into from
Jul 14, 2015

Conversation

skelet00r
Copy link
Contributor

I was running into an odd timing issue when using the closeByNavigation option alongside angular-ui-router package.

Reproduce:

  1. navigate to route with resolve and an ngdialog that loads as soon as the controller loads
  2. press back on the browser
  3. navigate to the same route again

Problem:
The second time that you entered the route the $locationChangeSuccess would fire after the controller loads which then forces the dialog to close.

Solution:
Added detection into ngdialog for $stateChangeSuccess as that fires consistently with controller instantiation through resolves.

Demo
Current ngDialog
http://s.codepen.io/jdelibas/debug/KpeXmr

PR #227 ngDialog
http://s.codepen.io/jdelibas/debug/aOKLyO

egor-smirnov added a commit that referenced this pull request Jul 14, 2015
@egor-smirnov egor-smirnov merged commit 2ab59e1 into likeastore:master Jul 14, 2015
@egor-smirnov
Copy link
Member

Perfect! Thank you, merging.

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

Successfully merging this pull request may close these issues.

2 participants