feat: FunctionWithParamTokens.execute now returns the value of the function
Closes https://github.com/angular/angular/issues/3131
This commit is contained in:
parent
cfc18b5a6f
commit
3dd05ef7db
@ -184,8 +184,11 @@ export class FunctionWithParamTokens {
|
|||||||
this._fn = fn;
|
this._fn = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(injector: Injector): void {
|
/**
|
||||||
|
* Returns the value of the executed function.
|
||||||
|
*/
|
||||||
|
execute(injector: Injector): any {
|
||||||
var params = ListWrapper.map(this._tokens, (t) => injector.get(t));
|
var params = ListWrapper.map(this._tokens, (t) => injector.get(t));
|
||||||
FunctionWrapper.apply(this._fn, params);
|
return FunctionWrapper.apply(this._fn, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user