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

Documented $stateParams gotcha is not reproducible in either 0.4.2 or 1.0.18. #3785

Closed corvinb closed 4 years ago

corvinb commented 4 years ago

This is a (check one box):

My version of UI-Router is: 0.4.2 and 1.0.18

Bug Report

The $stateParam gotcha documented in (https://github.com/angular-ui/ui-router/wiki/URL-Routing) states that the child state controller does not have access to the $stateParams parent parameter. This case is not reproducible with either 0.4.2 or 1.0.18.

Current Behavior:

The child state controller does have access to the parent parameter in $stateParams.

Expected Behavior:

The current behavior is as expected, however the documentation is incorrect. Has the gotcha ever been valid?

Link to Plunker or stackblitz that reproduces the issue:

Plunker with 0.4.2: https://next.plnkr.co/plunk/RrUEE1MOGZmqi8NT Plunker with 1.0.18: https://next.plnkr.co/plunk/elpINsooDgcEQYAK

( if you want a response to your issue, provide a way to reproduce it ) ( http://bit.ly/UIR-Plunk1 ) ( https://stackblitz.com/edit/ui-router-angularjs )

christopherthielen commented 4 years ago

I removed that from the wiki. If that ever was a thing, it was before my time working on this project.

FWIW, I don't really pay any attention to the wiki. Much of the content there is from the very early days of this project and may be outdated (although we've made a valiant effort not to make breaking changes along the way)

Thanks for pointing this out!