angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

uiOnParamsChanged not fired if used with componentProvider #3707

Closed Maximaximum closed 6 years ago

Maximaximum commented 6 years ago

This is a (check one box):

My version of UI-Router is: (type version) 1.0.5

Bug Report

Current Behavior:

Clicking the "1" and "2" links inside the stackblitz app does not change the displayed param value because component's uiOnParamsChanged method is never called. However, if you comment away the lines 22-24 and uncomment line 21 (i.e., use component instead of componentProvider in the state definition), everything works just as expected.

Expected Behavior:

Clicking the "1" and "2" links inside the stackblitz app should change the displayed param value to, respectively, "1" or "2", because the component's uiOnParamsChanged is called whenever a state param value changes.

Link to Plunker or stackblitz that reproduces the issue:

https://stackblitz.com/edit/ui-router-angularjs-budr1v

Maximaximum commented 6 years ago

The reason for the issue seems to be lying in this check: https://github.com/angular-ui/ui-router/blob/5fb93d042d5833514357d6e7956a4cf85be26900/src/directives/viewDirective.ts#L434

Maximaximum commented 6 years ago

@christopherthielen sorry to bother you, but are there any news regarding this issue?

christopherthielen commented 6 years ago

@Maximaximum thanks for the nice bug report. will be fixed in the next release.

Maximaximum commented 6 years ago

Looking forward to the new release! Thanks a lot for your work! :)

Maximaximum commented 6 years ago

@christopherthielen could you please give a hint on when a new version is going to be released?