IInjectorService.get has an optional 2nd param.

`caller` is an optional string to provide the origin of the function call for error messages. https://docs.angularjs.org/api/auto/service/$injector#get
This commit is contained in:
Daniel
2015-09-08 22:45:18 -04:00
parent 7f07bd88d1
commit 79dfea3815
+1 -1
View File
@@ -1693,7 +1693,7 @@ declare module angular {
interface IInjectorService {
annotate(fn: Function): string[];
annotate(inlineAnnotatedFunction: any[]): string[];
get<T>(name: string): T;
get<T>(name: string, caller?: string): T;
has(name: string): boolean;
instantiate<T>(typeConstructor: Function, locals?: any): T;
invoke(inlineAnnotatedFunction: any[]): any;