AngularJS $http Service $http service is a built-in AngularJS service for reading data from remote services. It uses browser’s XMLHttpRequest object to communicate with the server. $http service is a function that accepts a single argument which is the config object. The Config object defines various elements that we need to …
Continue reading AngularJS $http ServiceAngular.js
AngularJS Provider Provider is the most configurable and verbose version of creating services. A provider can be injected into our module’s config() block, where a user can configure it before the app starts. Register a Provider in AngularJS We can register a provider by calling the provider() function on angular.module(). …
Continue reading AngularJS ProviderAngularJS Factory Factory is similar to a Service, but as the name suggests its a factory for a service. Usually, the object you return from the factory function, has several functions that perform different tasks. For example, we can have a Math Factory that provides sum() and difference() functions to perform addition …
Continue reading AngularJS FactoryAngularJS Service This article explains creating a custom service in AngularJS. AngularJS provides several build-in services like $http that perform some predefined functionality. However, we can also register our own custom services for business specific to our app. We can create a service using following approaches: Create AngularJS service …
Continue reading AngularJS Service