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

uiCanExit also called for redirected states #51

Closed
kdbruin opened this issue Apr 26, 2017 · 1 comment
Closed

uiCanExit also called for redirected states #51

kdbruin opened this issue Apr 26, 2017 · 1 comment

Comments

@kdbruin
Copy link

kdbruin commented Apr 26, 2017

[Using UI-Router 1.0]

I have a parent state with several child states to handle a tabbed view. The parent state redirects to the first child state using a redirectTo property.

In an unrelated state I have a component with a uiCanExit function in the controller that shows a confirmation dialog when there is unsaved data (with cancel, discard and save). When I press discard I resolve the dialog promise to true but the confirmation dialog is displayed again. To prevent this I need to make sure that the conditions for displaying the dialog are not met.

Is this a bug or intended feature?

@christopherthielen
Copy link
Member

I think this was fixed in ui-router for angularjs 1.0.0-rc.2

angular-ui/ui-router#3308

angular-ui/ui-router@7a086ee

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

2 participants