|
23 | 23 | *
|
24 | 24 | * // use the injector to kick off your application
|
25 | 25 | * // use the type inference to auto inject arguments, or use implicit injection
|
26 |
| - * $injector.invoke(function($rootScope, $compile, $document){ |
| 26 | + * $injector.invoke(function($rootScope, $compile, $document) { |
27 | 27 | * $compile($document)($rootScope);
|
28 | 28 | * $rootScope.$digest();
|
29 | 29 | * });
|
@@ -97,8 +97,8 @@ function annotate(fn, strictDi, name) {
|
97 | 97 | }
|
98 | 98 | fnText = fn.toString().replace(STRIP_COMMENTS, '');
|
99 | 99 | argDecl = fnText.match(FN_ARGS);
|
100 |
| - forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){ |
101 |
| - arg.replace(FN_ARG, function(all, underscore, name){ |
| 100 | + forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) { |
| 101 | + arg.replace(FN_ARG, function(all, underscore, name) { |
102 | 102 | $inject.push(name);
|
103 | 103 | });
|
104 | 104 | });
|
@@ -133,7 +133,7 @@ function annotate(fn, strictDi, name) {
|
133 | 133 | * ```js
|
134 | 134 | * var $injector = angular.injector();
|
135 | 135 | * expect($injector.get('$injector')).toBe($injector);
|
136 |
| - * expect($injector.invoke(function($injector){ |
| 136 | + * expect($injector.invoke(function($injector) { |
137 | 137 | * return $injector;
|
138 | 138 | * }).toBe($injector);
|
139 | 139 | * ```
|
@@ -769,7 +769,7 @@ function createInjector(modulesToLoad, strictDi) {
|
769 | 769 | }
|
770 | 770 | }
|
771 | 771 |
|
772 |
| - function invoke(fn, self, locals, serviceName){ |
| 772 | + function invoke(fn, self, locals, serviceName) { |
773 | 773 | if (typeof locals === 'string') {
|
774 | 774 | serviceName = locals;
|
775 | 775 | locals = null;
|
|
0 commit comments