Reputation:
how to handle change event on angularjs rzslider:
<rzslider rz-slider-model="range_slider_ticks_values.minValue" rz-slider-high="range_slider_ticks_values.maxValue" rz-slider-options="range_slider_ticks_values.options"></rzslider>
Upvotes: 2
Views: 1314
Reputation: 2576
$scope.onSelectorSliderChange = function () {
console.log($scope.range_slider_ticks_values.value);
};
$scope.range_slider_ticks_values = {
value: 'DAY',
options: {
showTicksValues: true,
stepsArray: [
{value: 'Day'},
{value: 'Week'},
{value: 'Month'}
],
onEnd: $scope.onSelectorSliderChange
}
};
Put the function you want to trigger on change to options onEnd
. Hope it helps.
Upvotes: 0
Reputation: 112
In the default options of rzSlider you can define function for onChange with below params
onChange - Function(sliderId, modelValue, highValue, pointerType): Function to be called when rz-slider-model or rz-slider-high change. If an id was set in the options, then it's passed to this callback. pointerType is either 'min' or 'max' depending on which handle is used.
Refer: https://github.com/angular-slider/angularjs-slider
Upvotes: 1