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 the instance creation. Internally this is a short hand for |
Returns
Object |
registered provider instance |
Please login to continue.