aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/directives.js b/src/directives.js
index daa42048..20235f64 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -235,9 +235,10 @@ angularDirective("ng:controller", function(expression){
*/
angularDirective("ng:bind", function(expression, element){
element.addClass('ng-binding');
- var exprFn = parser(expression).statements();
- return ['$exceptionHandler', '$element', function($exceptionHandler, element) {
- var lastValue = Number.NaN;
+ return ['$exceptionHandler', '$parse', '$element', function($exceptionHandler, $parse, element) {
+ var exprFn = parser(expression),
+ lastValue = Number.NaN;
+
this.$watch(function(scope) {
// TODO(misko): remove error handling https://github.com/angular/angular.js/issues/347
var value, html, isHtml, isDomElement,