Closed
Description
I'm submitting a bug report
Current behavior
If we have a component with the following template :
<input type="range"
min="{{min}}"
max="{{max}}"
[ngModel]="value">
Setting boundary value (min or max or both) and input value at same time won't set the input value correctly.
updateRange() {
this.min = 0;
this.max = 50;
this.value = 25; //won't be at the center
}
As a workaound we can delay the value update to the next tick :
updateRange() {
this.min = 0;
this.max = 50;
setTimeout( () => this.value = 25, 0); //will work as expected
}
I've created a plunker : http://plnkr.co/edit/T8NKmEW7Y5EYHrpetPJk?p=preview
There is a similar issue for Angular 1 : angular/angular.js#6726
Angular version: 2.0.0-rc.1 to 2.0.0-rc.3