aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorMisko Hevery2011-11-02 21:37:06 -0700
committerMisko Hevery2011-11-14 16:39:33 -0800
commit16597e8b52bdfe34b2239a5ab86a839fa8e980d6 (patch)
treefba1654a5f60fce0a21e3d9ed7d1c09cf6c2efbd /src/directives.js
parentf684f20c9982768b6c6d2c0e0797a626c0627773 (diff)
downloadangular.js-16597e8b52bdfe34b2239a5ab86a839fa8e980d6.tar.bz2
refactor($service): removed almost all references to scope.$service
- still need to remove from factory
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js6
1 files changed, 3 insertions, 3 deletions
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 = {};