In the ui-router tutorial https://plnkr.co/edit/jbZgIg?p=info, they are passing a single parameter personId to the state.
ui-sref="people.person({ personId: person.id })" and the state is:
{ name: 'people.person', url: '/{personId}', component: 'person', resolve: { person: function(people, $stateParams) { return people.find(function(person) { return person.id === $stateParams.personId; }); } } } I am working on an example in which I want to pass 2 parameters (1 visible using the url, and the second hidden which will be the id that the user can't see in the url). Something similar to:
ui-sref="people.person({ personId: person.id, personUri : person.uri })" and I want the state to become something like this (but it didn't work!):
{ name: 'people.person', url: '/{personUri}', component: 'person', resolve: { person: function(people, $stateParams) { return people.find(function(person) { return person.id === $stateParams.personId; }); } } } As the state shows, I want to use the personUri in the url, and I want the personId to be passed to the people service.