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

Function minChange

test/angular/1.7/angular.js:27051–27070  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

27049 }
27050
27051 function minChange(val) {
27052 minVal = parseNumberAttrVal(val);
27053 // ignore changes before model is initialized
27054 if (isNumberNaN(ctrl.$modelValue)) {
27055 return;
27056 }
27057
27058 if (supportsRange) {
27059 var elVal = element.val();
27060 // IE11 doesn't set the el val correctly if the minVal is greater than the element value
27061 if (minVal > elVal) {
27062 elVal = minVal;
27063 element.val(elVal);
27064 }
27065 ctrl.$setViewValue(elVal);
27066 } else {
27067 // TODO(matsko): implement validateLater to reduce number of validations
27068 ctrl.$validate();
27069 }
27070 }
27071
27072 function maxChange(val) {
27073 maxVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected