feat: FunctionWithParamTokens.execute now returns the value of the function

Closes https://github.com/angular/angular/issues/3131
This commit is contained in:
Kevin Moore 2015-07-17 15:00:52 -07:00
parent cfc18b5a6f
commit 3dd05ef7db
1 changed files with 5 additions and 2 deletions

View File

@ -184,8 +184,11 @@ export class FunctionWithParamTokens {
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));
FunctionWrapper.apply(this._fn, params);
return FunctionWrapper.apply(this._fn, params);
}
}