fixed ng-min directive to include 0

the directive was evaluating 0 as 'false'
This commit is contained in:
Jared Tabor 2014-10-14 09:37:27 -04:00
parent d43ed5b67e
commit 3216d5e12b

View File

@ -99,7 +99,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
ctrl.$setViewValue(ctrl.$viewValue);
});
var minValidator = function (value) {
var min = scope.$eval(attr.ngMin) || -Infinity;
var min = (!attr.ngMin===false) ? scope.$eval(attr.ngMin) : -Infinity;
if (!Empty(value) && Number(value) < min) {
ctrl.$setValidity('ngMin', false);
return undefined;