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

Function maxChange

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

Source from the content-addressed store, hash-verified

24907 }
24908
24909 function maxChange(val) {
24910 maxVal = parseNumberAttrVal(val);
24911 // ignore changes before model is initialized
24912 if (isNumberNaN(ctrl.$modelValue)) {
24913 return;
24914 }
24915
24916 if (supportsRange) {
24917 var elVal = element.val();
24918 // IE11 doesn't set the el val correctly if the maxVal is less than the element value
24919 if (maxVal < elVal) {
24920 element.val(maxVal);
24921 // IE11 and Chrome don't set the value to the minVal when max < min
24922 elVal = maxVal < minVal ? minVal : maxVal;
24923 }
24924 ctrl.$setViewValue(elVal);
24925 } else {
24926 // TODO(matsko): implement validateLater to reduce number of validations
24927 ctrl.$validate();
24928 }
24929 }
24930
24931 function stepChange(val) {
24932 stepVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected