I am new to angular js and trying to figure out a way to call the below service in controller. the service is defined as below.
app.factory('myappFactory', ['$http', function($http) {
var data = {};
data.getmyServiceData = function() {
return $http.get('http://..')
}
return data;
}]);
This service is already called at one angular controller. I want to call it in different controller but do not want to make call to the actual service and instead use the data that is received from the previous call. How can i make change to it so that i can call the factory in different controller?