diff options
| author | Misko Hevery | 2012-01-12 11:06:10 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2012-01-12 13:40:07 -0800 | 
| commit | d648d709f3edcac56132e9e2a84a0fc65f5b48ac (patch) | |
| tree | ac0ba5763838a4f4b880dc72f0cbcedc1b7abc05 /src/service/compiler.js | |
| parent | 9a8dbfef5151e8e92dc010a597b670e7687ebe9b (diff) | |
| download | angular.js-d648d709f3edcac56132e9e2a84a0fc65f5b48ac.tar.bz2 | |
refactor(module): strict separation between module-config / app-runtime
Diffstat (limited to 'src/service/compiler.js')
| -rw-r--r-- | src/service/compiler.js | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/service/compiler.js b/src/service/compiler.js index 8a0dca7d..727f7983 100644 --- a/src/service/compiler.js +++ b/src/service/compiler.js @@ -28,7 +28,7 @@ function $CompileProvider(){            forEach(this.linkFns, function(fn) {              try {                if (isArray(fn) || fn.$inject) { -                $injector.invoke(childScope, fn, locals); +                $injector.invoke(fn, childScope, locals);                } else {                  fn.call(childScope, element);                } @@ -97,7 +97,7 @@ function $CompileProvider(){         * that is a DOM clone of the original template.         *           <pre> -          angular.injector('ng').invoke(null, function($rootScope, $compile) { +          angular.injector(['ng']).invoke(function($rootScope, $compile) {              // Chose one:              // A: compile the entire window.document. @@ -143,8 +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 $injector = angular.injector('ng'); -       *     var scope = $injector.invoke(null, function($rootScope, $compile){ +       *     var $injector = angular.injector(['ng']); +       *     var scope = $injector.invoke(function($rootScope, $compile){         *       var element = $compile('<p>{{total}}</p>')($rootScope);         *     });         *   </pre> @@ -277,7 +277,7 @@ function $CompileProvider(){              descend = false;              directives = false;              var parent = element.parent(); -            template.addLinkFn($injector.invoke(selfApi, widget, locals)); +            template.addLinkFn($injector.invoke(widget, selfApi, locals));              if (parent && parent[0]) {                element = jqLite(parent[0].childNodes[elementIndex]);              } @@ -310,7 +310,7 @@ function $CompileProvider(){                if (fn) {                  element.addClass('ng-directive');                  template.addLinkFn((isArray(fn) || fn.$inject) -                  ? $injector.invoke(selfApi, fn, {$value:value, $element: element}) +                  ? $injector.invoke(fn, selfApi, {$value:value, $element: element})                    : fn.call(selfApi, value, element));                }              }); | 
