I am trying to pass parameters via the ui-router state.go
However, I am not sure how to pass the parameters. Here are my codes
app.config(function($s
You could do this way in the first controller:-
$state.go("second", {'input' : $scope.userInput});
In the second controller inject $stateParams service.
app.controller('secondCtrl',["$scope", "$stateParams", function($scope, $stateParams){
var data = $stateParams.input;
}]);
and register that in your state:
.state('second', {
url: '/second/:input',
templateUrl: 'second.html'
})