-
-
Notifications
You must be signed in to change notification settings - Fork 497
when using stepsArray you cannot use the translate function #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Indeed, I couln't find a use case where I needed both stepsArray and translate. I discussed it in #163 . StepsArray values should already be translated. If you have a use case in mind that need both features, please share it. :) |
Well i guess its quite obvious, same use case as using translate in the first place. for example a list of of numerical values that i want to display with a currency symbol. I dont think the steparray values should already have that currency symbol no? maybe im missing something |
I'm actually using the stepsArray to display money and I directly add the symbol in the stepsArray values. It is more efficient since you don't need to recompute them at runtime. |
In my opinion, a translate function would be necessary if the steps values change while the slider is dragged. Otherwise, you only need to update the stepsArray. For the currency example, I would do: vm.values = [1, 10, 100, 1000];
vm.sliderConfig = {
stepsArray: vm.values.map(function (v) {
return '$' + v;
})
};
} |
Closing as no answer for more than a week |
this can be seen here: https://github.com/rzajac/angularjs-slider/blob/master/src/rzslider.js#L368
shouldnt this be an improvement?
:)
The text was updated successfully, but these errors were encountered: