It appears that your params
is structured as an associative array.
You can check out this discussion on this GitHub link where christopherthielen shares some insights.
.state('foo', {
url: '/foo/:param1?param2',
params: { param3: null } // null serves as the default value
});
$state.go('foo', { param1: 'bar', param2: 'baz', param3: { id: 35, name: 'what' } });
$stateParams in 'foo' now contains { param1: 'bar', param2: 'baz', param3: { id: 35, name: 'what' } }
Additionally, as mentioned in another answer on this Stack Overflow post,
In version 0.2.13, you have the capability to pass objects into $state.go,
$state.go('myState', {myParam: {some: 'thing'}})
$stateProvider.state('myState', {
url: '/myState/{myParam:json}',
params: {myParam: null}, ...
and then access the parameter in your controller.
$stateParams.myParam;