diff --git a/src/ng/compile.js b/src/ng/compile.js index 41c45f5b..78479722 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1804,9 +1804,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { bindings = parent.data('$binding') || []; bindings.push(interpolateFn); safeAddClass(parent.data('$binding', bindings), 'ng-binding'); - scope.$watch(interpolateFn, function interpolateFnWatchAction(value) { + scope.$watchGroup(interpolateFn.expressions, interpolateFn.$$invoke(function(value) { node[0].nodeValue = value; - }); + })); }) }); } @@ -1867,7 +1867,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { attr[name] = interpolateFn(scope); ($$observers[name] || ($$observers[name] = [])).$$inter = true; (attr.$$observers && attr.$$observers[name].$$scope || scope). - $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) { + $watchGroup(interpolateFn.expressions, interpolateFn.$$invoke(function (newValue, oldValue) { //special case for class attribute addition + removal //so that class changes can tap into the animation //hooks provided by the $animate service. Be sure to @@ -1879,7 +1879,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } else { attr.$set(name, newValue); } - }); + })); } }; }