Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9c34006

Browse files
committed
refactor(ngModel): use local scope param in watcher
1 parent ad4a20d commit 9c34006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/directive/ngModel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,8 @@ function setupModelWatcher(ctrl) {
890890
// -> scope value did not change since the last digest as
891891
// ng-change executes in apply phase
892892
// 4. view should be changed back to 'a'
893-
ctrl.$$scope.$watch(function ngModelWatch() {
894-
var modelValue = ctrl.$$ngModelGet(ctrl.$$scope);
893+
ctrl.$$scope.$watch(function ngModelWatch(scope) {
894+
var modelValue = ctrl.$$ngModelGet(scope);
895895

896896
// if scope model value and ngModel value are out of sync
897897
// TODO(perf): why not move this to the action fn?

0 commit comments

Comments
 (0)