Wrapping the watch in the elm.focus
Seems to bring the watch calls way down.
This commit is contained in:
@@ -10,10 +10,14 @@ function noDirtyCheck() {
|
||||
require: 'ngModel',
|
||||
link: function (scope, elm, attrs, ctrl) {
|
||||
|
||||
scope.$watch(function () {
|
||||
ctrl.$pristine = false;
|
||||
elm.focus(function () {
|
||||
scope.$watch(function() {
|
||||
ctrl.$pristine = false;
|
||||
console.log("here");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user