-
Notifications
You must be signed in to change notification settings - Fork 3k
transitionTo with params doesn't work in 0.2.11 #1319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I failed making transitionTo work in plunkr, sorry. |
By "doesn't work", do you mean that you can't reproduce your issue? Because I just clicked through your demo with 0.2.10 and 0.2.11, and the output is the same for both. Since transitioning with parameters is thoroughly unit tested, and very much a core feature of the library (for which, as you noted, there are no other bug reports), I strongly suspect this is not an issue related to UI Router. |
I've meant that in plunkr my transitionTo just didn't change the state at all. perhaps I do have some mistake (which I can't find). anyway, on my real-project I do have the transitionTo+parameter issue... |
I'll retry reproduce it in plunkr. |
Yes, please. Btw, the state change also seemed to work fine. (Maybe just not as you expect, though?) |
Can you please take a look at this: With 0.2.10 after clicking the "click me to transition" you'll see the stateParams passed to transitionTo. |
When I'm trying to move from "list" state to "edit.credentials" state via ui-sref="main.settings.management.edit.credentials({id: someId})", I've got {0: undefined} in $stateParams console.log.Is it bug or I'm trying to do something wrong here? Update: When I call my parameter '0' instead of 'id', it works, but I'd rather use normal name for params |
Okay, there are two issues at play here. One is that Therefore: Secondly (and this is a problem with your code using a feature that has been BC-broken), the format for |
closing in lieu of #1362 |
I think something bad happened to stateParams in 0.2.11 (and I didn't find any open issue on this)
a code snippet:
Controller1:
$state.transitionTo('S.T', {'id':2, 'conversation':3});
StateProvider:
.state('S.T', {
templateUrl: 'views/something.html',
controller: 'Controller2',
params: ['id', 'conversation']
})
in Controller2 $stateParams is {0:undefined, 1: undefined}
Moving back to angular-ui-router#0.2.10 fixes this issue.
Thank you
The text was updated successfully, but these errors were encountered: