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

Commit b0821af

Browse files
committed
Directly call $setTouched
1 parent cb540c7 commit b0821af

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ng/directive/input.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -2459,14 +2459,10 @@ var ngModelDirective = function() {
24592459

24602460
element.on('blur', function(ev) {
24612461
if (modelCtrl.$touched) return;
2462-
2463-
var onBlurSetTouched = function() {
2464-
modelCtrl.$setTouched();
2465-
};
24662462
if (scope.$$phase) {
2467-
scope.$evalAsync(onBlurSetTouched);
2463+
scope.$evalAsync(modelCtrl.$setTouched);
24682464
} else {
2469-
scope.$apply(onBlurSetTouched);
2465+
scope.$apply(modelCtrl.$setTouched);
24702466
}
24712467
});
24722468
}

0 commit comments

Comments
 (0)