Venturocket / angular-slider

Slider directive for AngularJS.
MIT License
262 stars 121 forks source link

Bind a array of data instead of a range #64

Open florentdestremau opened 10 years ago

florentdestremau commented 10 years ago

Hi,

I just recently started to use this slider which is pretty nice, but i'd like to have a slider for a few dates, but that have no mathematical links (step can be from 2 to 7). Is there a way to use something like a ng-repeat="date in [2018,2021,2023,2026,2033,2038,2043] in the call for slider ?

/* form.html */
<slider
    ng-model="formCtrl.endDate",
    ng-repeat="date in [2018,2021,2023,2026,2033,2038,2043]"
>

Instead of a floor/ceiling/step definition ?

I don't really care if it will visually impact the slider with differents gaps (best would be to have the same gap even though the numerical values aren't regularly spaced) but i'd like to have the values matching an array.

Any ideas ? :smiley:

drgould commented 10 years ago

I'm in the process of rewriting the slider from scratch. I'll add this in.

florentdestremau commented 10 years ago

ty :smiley: