Angular services are simply objects that contain some code that can be shared across your app.
app.controller('someControllerName', function($scope, $http) {
// Cool controller stuff
});app.controller('someControllerName', function($scope, $http) {
$http.get('URL').then(function(data){
$scope.view.zenData = data;
}
});{
"data":"Keep it logically awesome.",
"status":200,
"config": {
"method":"GET",
"transformRequest":[null],
"transformResponse":[null],
"url":"https://api.github.com/zen",
"headers":{
"Accept":"application/json, text/plain, */*"
}
},
"statusText":"OK"
}Response Body
Response Line
Response Line
Response Headers