stateEvents.js: `$stateChangeSuccess` fired too late #3144

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

Projects

None yet

1 participant

@christopherthielen
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
Contributor

Original bug report: #3138

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