Why are the min/max attributes on input[number] tags not updated on change ?
JS:
angular.module('test', [])
.controller('mainctrl', function ($scope, $timeout) {
$scope.min = 10;
$scope.value = 20;
$timeout(function () {
$scope.min = 30;
}, 3000);
});
HTML:
<input name="min" class="form-control" type="number" ng-model="min">
<input name="value" class="form-control" type="number" ng-model="value" min="{{min}}">
JSBin : http://jsbin.com/devilehize/1/edit?html,js,output
What i am expecting is that the "Value" field invalidates after the timeout is triggered. But it is still valid although the min value is now higher than the current value in the field.
Angular Version 1.2.26. Since the last entry on this topic is from December 2013 I am not considering this as a duplicate, because of the fact that this apparently a known issue and could have been fixed.
EDIT:
As of Angular Version 1.3.2 this is issue seems to be fixed. But since i'm running a production app on 1.2.26 with this issue an answer/workaround is still welcome. JSBin: http://jsbin.com/miyuqunoze/1/edit?html,js,output