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 consulted.

Returns

*

the value returned by the invoked fn function.

doc_AngularJS
2016-03-29 16:11:02
Comments
Leave a Comment

Please login to continue.