Venturocket / angular-slider

Slider directive for AngularJS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bind a array of data instead of a range

florentdestremau opened this issue · comments

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 ? 😃

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