MCPcopy Index your code
hub / github.com/angular-ui/ui-router / minChange

Function minChange

test/angular/1.5/angular.js:24888–24907  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

24886 }
24887
24888 function minChange(val) {
24889 minVal = parseNumberAttrVal(val);
24890 // ignore changes before model is initialized
24891 if (isNumberNaN(ctrl.$modelValue)) {
24892 return;
24893 }
24894
24895 if (supportsRange) {
24896 var elVal = element.val();
24897 // IE11 doesn't set the el val correctly if the minVal is greater than the element value
24898 if (minVal > elVal) {
24899 elVal = minVal;
24900 element.val(elVal);
24901 }
24902 ctrl.$setViewValue(elVal);
24903 } else {
24904 // TODO(matsko): implement validateLater to reduce number of validations
24905 ctrl.$validate();
24906 }
24907 }
24908
24909 function maxChange(val) {
24910 maxVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected