How to pass data between two states. i tried this and it is not working. I saw that stateparams are depricated and this is not a duplicate thread. This is for UI router 1.0.3
In the first controller
$state.go('state2', {id: $scope.value} );
And in second controller
$scope.state2value = $state.params.id;