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

Function maxChange

test/angular/1.6/angular.js:26078–26098  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

26076 }
26077
26078 function maxChange(val) {
26079 maxVal = parseNumberAttrVal(val);
26080 // ignore changes before model is initialized
26081 if (isNumberNaN(ctrl.$modelValue)) {
26082 return;
26083 }
26084
26085 if (supportsRange) {
26086 var elVal = element.val();
26087 // IE11 doesn't set the el val correctly if the maxVal is less than the element value
26088 if (maxVal < elVal) {
26089 element.val(maxVal);
26090 // IE11 and Chrome don't set the value to the minVal when max < min
26091 elVal = maxVal < minVal ? minVal : maxVal;
26092 }
26093 ctrl.$setViewValue(elVal);
26094 } else {
26095 // TODO(matsko): implement validateLater to reduce number of validations
26096 ctrl.$validate();
26097 }
26098 }
26099
26100 function stepChange(val) {
26101 stepVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected