Angular Injectable Services
When using AngularJS(1.xx), we were defining a service like this: var app = angular.module('app',[]); app.factory('customService',function($http){ return { getAll:function(){ return $http.get('Your_Api_Url_Here'); } } }); Well, why do we need to use services? If you don’t want to write more code and when you need to change your api, if you don’t want to change more code, angular services are your friend. Generally you’d make http requests but you can use these services for anything, for example if you want to communicate with other components in the app etc....