auto.$provide.decorator()

decorator(name, decorator); Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behavior of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service. Parameters Param Type Details name string The name of the service to decorate. decorator function()Array.<(string|function())> Th

auto.$provide.value()

value(name, value); Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service. That also means it is not possible to inject other services into a value service. Value services are similar to constant services, except that they cannot be injected into a module configuration function (see angular.M

auto.$provide.factory()

factory(name, $getFn); Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider. Parameters Param Type Details name string The name of the instance. $getFn function()Array.<(string|function())> The injectable $getFn for

auto.$provide.provider()

provider(name, provider); Register a provider function with the $injector. Provider functions are constructor functions, whose instances are responsible for "providing" a factory for a service. Service provider names start with the name of the service they provide followed by Provider. For example, the $log service has a provider called $logProvider. Service provider objects can have additional methods which allow configuration of the provider and its service. Importantly, you can configure wh

auto.$provide.constant()

constant(name, value); Register a constant service with the $injector, such as a string, a number, an array, an object or a function. Like the value, it is not possible to inject other services into a constant. But unlike value, a constant can be injected into a module configuration function (see angular.Module) and it cannot be overridden by an Angular decorator. Parameters Param Type Details name string The name of the constant. value * The constant value. Returns Object regi

auto.$injector.instantiate()

instantiate(Type, [locals]); Create a new instance of JS type. The method takes a constructor function, invokes the new operator, and supplies all of the arguments to the constructor function as specified by the constructor annotation. Parameters Param Type Details Type Function Annotated constructor function. locals (optional) Object Optional object. If preset then any argument names are read from this object first, before the $injector is consulted. Returns Object new instanc

auto.$injector.invoke()

invoke(fn, [self], [locals]); Invoke the method and supply the method arguments from the $injector. Parameters Param Type Details fn function()Array.<(string|function())> The injectable function to invoke. Function parameters are injected according to the $inject Annotation rules. self (optional) Object The this for the invoked method. locals (optional) Object Optional object. If preset then any argument names are read from this object first, before the $injector is con

auto.$injector.get()

get(name, [caller]); Return an instance of the service. Parameters Param Type Details name string The name of the instance to retrieve. caller (optional) string An optional string to provide the origin of the function call for error messages. Returns * The instance.

auto.$injector.has()

has(name); Allows the user to query if the particular service exists. Parameters Param Type Details name string Name of the service to query. Returns boolean true if injector has given service.

auto

Implicit module which gets automatically added to each $injector. Module Components Service Name Description $injector $injector is used to retrieve object instances as defined by provider, instantiate types, invoke methods, and load modules. $provide The $provide service has a number of methods for registering components with the $injector. Many of these functions are also exposed on angular.Module.