angular.injector
Description
Creates an inject function that can be used for dependency injection.
Usage
angular.injector(providerScope, providers, cache);
Parameters
- providerScope –
{Object=}
[{}]
– provider's
this
- providers –
{Object.<string, function()>=}
[angular.service]
– Map of provider (factory)
function.
- cache –
{Object.<string, function()>=}
[{}]
– Place where instances are saved for reuse. Can
also be used to override services speciafied by
providers
(useful in tests).
Returns
{function()} Injector function.