This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Can't share a data-ng-model between <input type="number" /> and <input type="range" /> #8241
Closed
Description
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?