You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My version of UI-Router is: 0.4.2
and I'm using: "angular": "~1.5"
Bug Report
Current Behavior:
resolve state parameter can't handle dependency injection properly, it fails when code is minified.
This was extremely hard to debug. Generally I was trying to check if state params are present, like someone suggested here
Expected Behavior:
DI annotations should be handled consistently with the rest of angular. I am aware that this is probably bad usage of resolve , but if it allows DI it should handle all cases.
No, you aren't using resolve correctly. Resolve is an object with keys and values.
Your example should read something like:
resolve: {somekey: ['$stateParams','$location',function($stateParamsMinified,$location){console.log("This won't work for minified arguments",$stateParamsMinified,$location.path());}]}
it probably works because of a bug or something. it's been fixed in 1.0 branch. Yeah a warning might be nice for obviously invalid resolve: block. It's not high on my list, so PR welcomed
This is a:
My version of UI-Router is: 0.4.2
and I'm using: "angular": "~1.5"
Bug Report
Current Behavior:
resolve state parameter can't handle dependency injection properly, it fails when code is minified.
This was extremely hard to debug. Generally I was trying to check if state params are present, like someone suggested here
Expected Behavior:
DI annotations should be handled consistently with the rest of angular. I am aware that this is probably bad usage of resolve , but if it allows DI it should handle all cases.
Link to Plunker that reproduces the issue:
https://plnkr.co/edit/RnLcUc5h6zbPvGjkIo0P?p=preview
The text was updated successfully, but these errors were encountered: