A proposal to add to wiki or readme:
To use fd-slider with AngularJs by a directive:
.directive('fdSlider', ["$parse", function ($parse) {
return function (scope, elm, attrs) {
var scaleStr = attrs.scale || "{}";
var scale = $.parseJSON(scaleStr);
if ("fdSlider" in window) {
fdSlider.createSlider({
// Associate an input
inp: elm[0],
// Declare a step
step: attrs.step || 1,
// Declare a maxStep (for keyboard users)
maxStep: attrs.step || 1,
// Min value
min: attrs.min || 1,
// Max value
max: attrs.max || 100,
// Define a scale (multiple points supported, I'm just using one for the
// demo)
scale: scale,
callbacks : {
"change": [function(inp) {
scope.$apply(attrs.sliderModel + "=" + inp.value);
}]
},
// Use the "jump to click point" animation
animation: "jump"
});
}
};
}]);
A proposal to add to wiki or readme: To use fd-slider with AngularJs by a directive:
and a html sample:
And thank you very much for your excellent plugin.
Alexandre Richonnier