-
Notifications
You must be signed in to change notification settings - Fork 3k
passing params with ui-sref with a "urlless" state not passing params #708
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
This isn't supposed to work. You need to declare state params for them to show up. If you don't use urls then you can declare params with the |
hi @timkindberg thanks for the response. I searched the docs and wiki and did not find any docs on this topic. However I did locate where in the source code this is implemented. Would you mind showing me the de facto way to accomplish this? I will open a PR with a doc addition after. Thanks |
Hi @timkindberg following your advice I called $state.go('foo', {id: 123}); Since this calls I would then expect from within my controller the ability to call alas both are still |
ok so the solution as talked about here #175 in your state definition $stateProvider.state('foo', {
template: templates.foo,
controller: 'foo'
params: ['id'] //array of param keys
}); $state.go('foo', {id: 123}); |
Given markup
a state provider with
and a controller with
State Params is an empty
{}
where I would expect id to be 123The text was updated successfully, but these errors were encountered: