diff options
| author | Misko Hevery | 2011-11-02 21:37:06 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 16:39:33 -0800 |
| commit | 16597e8b52bdfe34b2239a5ab86a839fa8e980d6 (patch) | |
| tree | fba1654a5f60fce0a21e3d9ed7d1c09cf6c2efbd /src | |
| parent | f684f20c9982768b6c6d2c0e0797a626c0627773 (diff) | |
| download | angular.js-16597e8b52bdfe34b2239a5ab86a839fa8e980d6.tar.bz2 | |
refactor($service): removed almost all references to scope.$service
- still need to remove from factory
Diffstat (limited to 'src')
| -rw-r--r-- | src/angular-mocks.js | 2 | ||||
| -rw-r--r-- | src/directives.js | 6 | ||||
| -rw-r--r-- | src/service/scope.js | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js index b4b2fd19..8ce3011d 100644 --- a/src/angular-mocks.js +++ b/src/angular-mocks.js @@ -561,7 +561,7 @@ angular.mock.TzDate = function (offset, timestamp) { self[methodName] = function() { throw { name: "MethodNotImplemented", - message: "Method '" + methodName + "' is not implemented in the TzDate mock" + message: "Method '" + methodName + "' is not implemented in the TzDate mock" }; }; }); diff --git a/src/directives.js b/src/directives.js index ee88e2a5..daa42048 100644 --- a/src/directives.js +++ b/src/directives.js @@ -236,7 +236,7 @@ angularDirective("ng:controller", function(expression){ angularDirective("ng:bind", function(expression, element){ element.addClass('ng-binding'); var exprFn = parser(expression).statements(); - return function(element) { + return ['$exceptionHandler', '$element', function($exceptionHandler, element) { var lastValue = Number.NaN; this.$watch(function(scope) { // TODO(misko): remove error handling https://github.com/angular/angular.js/issues/347 @@ -269,7 +269,7 @@ angularDirective("ng:bind", function(expression, element){ } } } catch (e) { - scope.$service('$exceptionHandler')(e); + $exceptionHandler(e); } finally { if (hadOwnElement) { scope.$element = oldElement; @@ -278,7 +278,7 @@ angularDirective("ng:bind", function(expression, element){ } } }); - }; + }]; }); var bindTemplateCache = {}; diff --git a/src/service/scope.js b/src/service/scope.js index f78ac448..8c7926de 100644 --- a/src/service/scope.js +++ b/src/service/scope.js @@ -312,7 +312,7 @@ function $RootScopeProvider(){ try { current.$eval(asyncQueue.shift()); } catch (e) { - current.$service('$exceptionHandler')(e); + $exceptionHandler(e); } } if ((watchers = current.$$watchers)) { |
