prajwalkman / angular-slider

(DEPRECATED) Slider directive implementation for AngularJS, without jQuery dependencies
http://prajwalkman.github.io/angular-slider
MIT License
249 stars 177 forks source link

values as strings brakes input[type='number'] #64

Open CosticaPuntaru opened 10 years ago

CosticaPuntaru commented 10 years ago

from what i can tell the slider sets the model value as string not as number, this breaks ngModel for input[type='number'] example:

<label for="min_price">Min: <input type="number" step="50" min="0" name="min_price" id="min_price" ng-model="min_price"></label>
<label for="max_price">Max: <input type="number" step="50" min="0" name="max_price" id="max_price" ng-model="max_price"></label>
<slider floor="0" ceiling="2000" step="50" ng-model-low="min_price" ng-model-high="max_price"></slider>

in the prev example the inputs appear as blank and dose not work at all

CosticaPuntaru commented 10 years ago

changing the line 194 to scope[ref] = parseFloat newValue fixes tjhe issue (from what i can tell)