how to share the data between the views in angualr : i am doing one angular project in which i am loading the new view by calling the function . up to this thing it is fine . now the my requirement is i want some data to transferred to the new view from the same same function . using the same controller . i am showing here the demo code.

<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    $scope.passID = function(id){
    	console.log(id);
    	$state.go("view", {id: $scope.id });
    		  

    	}

<!-- end snippet -->

