vasyabigi / angular-nouislider

Simple angular directive for jquery nouislider plugin
http://vasyabigi.github.io/angular-nouislider/
MIT License
84 stars 53 forks source link

call parseFloat()... #17

Open mg1075 opened 10 years ago

mg1075 commented 10 years ago

I believe the directive should be calling parseFloat() in more places...

slider.noUiSlider({
          start: [
            scope.ngFrom || scope.start,
            scope.ngTo || scope.end

...should change to this:

slider.noUiSlider({
          start: [
            parseFloat(scope.ngFrom) || parseFloat(scope.start),
            parseFloat(scope.ngTo) || parseFloat(scope.end)
mg1075 commented 10 years ago

Part of the reason I was noting this was due to the fact of attempting to change the 'start' property to a different name. Well, turns out if you have a property ending in -start or -end, you're in for a heap of trouble.

http://stackoverflow.com/questions/21242444/angularjs-directive-cannot-get-attributes-ending-with-start