If a parent state is declared within a lazyLoad function and a descendant state declaration references this state outside of a lazyLoad function, the $stateRegistry.onStatesChanged event is not triggered for the lazy loaded state.
Expected Behavior:
I would expect a lazy loaded state to have the $stateRegistry.onStatesChanged event triggered even if it is referenced by a non lazy loaded state declaration.
Link to Plunker or stackblitz that reproduces the issue:
This is a (check one box):
My version of UI-Router is:
Bug Report
Current Behavior:
If a parent state is declared within a
lazyLoad
function and a descendant state declaration references this state outside of alazyLoad
function, the$stateRegistry.onStatesChanged
event is not triggered for the lazy loaded state.Expected Behavior:
I would expect a lazy loaded state to have the
$stateRegistry.onStatesChanged
event triggered even if it is referenced by a non lazy loaded state declaration.Link to Plunker or stackblitz that reproduces the issue:
https://stackblitz.com/edit/ui-router-angularjs-ejwh3n?file=app.js
Repro steps:
lazy
link at the top.lazy
state being registered is missing unless you comment out line 41.