Add support for the input type=range
Originally filed here: https://github.com/angular/angular.js/issues/1189
(This was incorrectly closed and despite requests to reopen, has remained closed so I'm reposting as a new ticket. For future reference, closing old tickets due to lack of activity is probably not a good idea.)
With multiple inputs to the same model doesn't play ball. It works as an input but updating it to a value set from another input always fails. Even if the source is also constrained as numeric (type="range" in chrome). This is due to the model being stored as a string.
Demo: http://jsfiddle.net/TXazw/5/Edit Edit any input except the number and everything updates except the number input. Edit the number input and everything works fine.
A workaround is included. Uncomment parseFloat line and all inputs work correctly.
Should values not be automatically parsed when applied to a number type input? At the very least type="range" should be outputting a number rather than a string.
Discussed in the group: https://groups.google.com/forum/?fromgroups#!topic/angular/Ecjx2fo8Qvk
+1
+1
People have been writing +1 for 1.5 years. Can someone on the angular team comment?
(You mean like add a +1 themselves ? :stuck_out_tongue:)
This issue has the PRs plz label, which means that it would be a welcome addition and easy enough for a non-core member/external contributor to impelement.
It also has the Lots of comments label, which indicates that it is under the team's radar.
So, there's not much more to comment about it I guess (for the time being at least). If they haven't taken care of it yet, it's probably because they have been attending to other issues (bug fixes, perf improvements, features, chores) that were higher in priority (for whatever reason).
Patience poor issue...your turn will come...(unless, you know, it doesn't)...
(Not speaking on behalf of the team or anything...)
@seriema #9715 is a PR for this issue. It's currently marked 1.5-candidate, so it may be resolved in v1.5
+1
+1
+1
+1
+1
+1
+1
+1
+1.
Just traced a weird-looking bug to this - in a language where ("7" + 3) * 10 is 730, having obviously-numeric values be strings is just asking for sensible-looking code to produce insane values.
+1
+1
+1
To summarize:
The bug has been fixed in version 1.5.9. But for it to work you have to add the attribute ng-input-range to the input[type=range] element. This is not necessary for Angular.js 1.6.
https://code.angularjs.org/1.5.9/docs/api/ng/input/input%5Brange%5D