aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/compiler.js
diff options
context:
space:
mode:
authorMisko Hevery2011-11-12 15:23:30 -0800
committerMisko Hevery2011-11-14 20:31:19 -0800
commite88dfb734a64aad4dbd402642816781b0e1725ec (patch)
tree19fb3dde697d1dc3082be9550c76aa29a8c232a7 /src/service/compiler.js
parent8d6dc0b9a7b3dbff5f8edb3217b60b0cc5b66be4 (diff)
downloadangular.js-e88dfb734a64aad4dbd402642816781b0e1725ec.tar.bz2
refactor(injector): $injector is no longer a function.
- $injector('abc') -> $injector.get('abc'); - $injector(fn) -> $injector.invoke(null, fn);
Diffstat (limited to 'src/service/compiler.js')
-rw-r--r--src/service/compiler.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/service/compiler.js b/src/service/compiler.js
index 781d7b3a..3464a1a0 100644
--- a/src/service/compiler.js
+++ b/src/service/compiler.js
@@ -143,7 +143,8 @@ function $CompileProvider(){
* - If you are not asking the linking function to clone the template, create the DOM element(s)
* before you send them to the compiler and keep this reference around.
* <pre>
- * var scope = angular.injector('ng')(function($rootScope, $compile){
+ * var $injector = angular.injector('ng');
+ * var scope = $injector.invoke(null, function($rootScope, $compile){
* var element = $compile('<p>{{total}}</p>')($rootScope);
* });
* </pre>