refactor(ngModel): use local scope param in watcher

This commit is contained in:
Jason Bedard
2017-03-20 22:47:56 -07:00
parent bf5c2eef34
commit 2931a6df03
+2 -2
View File
@@ -890,8 +890,8 @@ function setupModelWatcher(ctrl) {
// -> scope value did not change since the last digest as
// ng-change executes in apply phase
// 4. view should be changed back to 'a'
ctrl.$$scope.$watch(function ngModelWatch() {
var modelValue = ctrl.$$ngModelGet(ctrl.$$scope);
ctrl.$$scope.$watch(function ngModelWatch(scope) {
var modelValue = ctrl.$$ngModelGet(scope);
// if scope model value and ngModel value are out of sync
// TODO(perf): why not move this to the action fn?