darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
144 stars 63 forks source link

error in version 2.0.5 #40

Closed pgrodrigues closed 9 years ago

pgrodrigues commented 9 years ago

My horizontal sliders with double cursors stopped working after updating to version 2.0.5.

Error:

TypeError: Cannot read property 'vertical' of undefined
    at link (http://localhost:3000/bower_components/ng-slider/dist/ng-slider.min.js:6:414)

Here is the line from ng-slider.min.js referred in the error: g.mainSliderClass+=g.options.vertical?" vertical ":"",

darul75 commented 9 years ago

hi, looks like you have provided a null options object. "vertical" property is not needed by default and can be omitted.

can you send me your options, example

scope.options = {               
 from: 0,
to: 40,
step: 0.5,
dimension: " $",
round: 1,
scale: [0, '|', 10, '|', 20, '|' , 30, '|', 40],
heterogeneity: ['50/100', '75/250']
};
pgrodrigues commented 9 years ago

These are my options:


scope.sliderOptions = {
    from: scope.result.t_init,
    to: scope.result.t_final,
    step: 1,
    dimension: ' min'
};
darul75 commented 9 years ago

Not reproduced, can you use https://github.com/darul75/ng-slider/blob/master/src/ng-slider.html and put your option inside for instance.

Just unzip the following https://github.com/darul75/ng-slider/archive/2.0.6.zip

pgrodrigues commented 9 years ago

It is a problem from my code, probably messing something with directives.

I placed the slider in other view and it worked :D.

Thank you for the help.

darul75 commented 9 years ago

you are welcome, do not hesitate put a star ;)

darul75 commented 9 years ago

migrate to 2.0.6, bug in 2.0.5