You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Simply put, at least in chrome <input type="number" />.value is a number. and <input type="range" />.value is a string, so that's what is breaking the data-ng-model binding. That could be fixed with some casting with the ngModel directive (and possibly the ngBind directive).
On another note, the w3c spec for number input and range input both say the value should be a string representation of a number. Is this worth filing a bug with chrome over?
The text was updated successfully, but these errors were encountered:
Hey @zippy1981, I edited your post so that the html tags show up. The general problem is that currently angular has no special range handling, but if it is added, this should be considered.
the input[type=range] behavior is the same of an input[type=number]
with min=0, max=100 and step=1 as defaults
Closesangular#5892, angular#8241, angular#7370
cironunes
added a commit
to cironunes/angular.js
that referenced
this issue
Oct 21, 2014
the input[type=range] behavior is the same of an input[type=number]
with min=0, max=100 and step=1 as defaults
Closesangular#5892, angular#8241, angular#7370
I demonstrate the issue in a plunkr here . This stackoverflow answer describes the issue in detail.
Simply put, at least in chrome
<input type="number" />.value
is a number. and<input type="range" />
.value is a string, so that's what is breaking the data-ng-model binding. That could be fixed with some casting with the ngModel directive (and possibly the ngBind directive).On another note, the w3c spec for number input and range input both say the value should be a string representation of a number. Is this worth filing a bug with chrome over?
The text was updated successfully, but these errors were encountered: