Skip to content

stateEvents.js: $stateChangeSuccess fired too late #3144

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

Closed
christopherthielen opened this issue Nov 10, 2016 · 1 comment
Closed

stateEvents.js: $stateChangeSuccess fired too late #3144

christopherthielen opened this issue Nov 10, 2016 · 1 comment
Milestone

Comments

@christopherthielen
Copy link
Contributor

in legacy ui-router, $stateChangeSuccess is fired immediately after global state is updated and before the views are rendered.

Currently the stateEvents.js polyfill fires the event by chaining off the $transition$.promise, which seems OK, but views can already be loaded at this point.

In 1.0, the hook which updates globals is a priority 10000. The invoke views hook is priority 0.
To match legacy behavior, move the $stateChangeHook polyfill event to priority 9999, just after globals are updated.

@christopherthielen christopherthielen added this to the 1.0.0-beta.4 milestone Nov 10, 2016
@christopherthielen
Copy link
Contributor Author

Original bug report: #3138

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

No branches or pull requests

1 participant