MCPcopy
hub / github.com/angular-ui/ui-router / minChange

Function minChange

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

Source from the content-addressed store, hash-verified

26055 }
26056
26057 function minChange(val) {
26058 minVal = parseNumberAttrVal(val);
26059 // ignore changes before model is initialized
26060 if (isNumberNaN(ctrl.$modelValue)) {
26061 return;
26062 }
26063
26064 if (supportsRange) {
26065 var elVal = element.val();
26066 // IE11 doesn't set the el val correctly if the minVal is greater than the element value
26067 if (minVal > elVal) {
26068 elVal = minVal;
26069 element.val(elVal);
26070 }
26071 ctrl.$setViewValue(elVal);
26072 } else {
26073 // TODO(matsko): implement validateLater to reduce number of validations
26074 ctrl.$validate();
26075 }
26076 }
26077
26078 function maxChange(val) {
26079 maxVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected