Reputation: 1024
$stateProvider.
state('steps', {
url: '/steplist/:stepList/:startStepId/:endStepId',
templateUrl: 'views/step.html',
controller: 'StepsCtrl'
});
I have the state 'steps' and it's url has :steplist , :startStepId and :endStepId dynamically set. So how do I set these values from the controller using $state.go() function ?
Upvotes: 0
Views: 571
Reputation: 2800
$state.go(to [, toParams] [, options]);
The second parameter of $state.go()
is an object containing the state parameters. See ui-router project wiki for more details.
$state.go('steps', { stepList: 1, startStepId: 2, endStepId: 3});
Upvotes: 3