You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to read the slider handle values using the mouse up event... but i can't find a way to read the value while the handle is being dragged. I am certainly missing something, as i can see the values updating as i move the handles on your demo page. how can i achieve this?
For example, i have a 2 handle slider, and i want to call some code as soon as any 1 of them is dragged and while it is being dragged, so effectively as soon as the value changes. (One way i can think of is to watch the slider variable in my controller)
The text was updated successfully, but these errors were encountered:
You should be able to read the handle values using the array you bound to slider-handle-variable. In general, this is the preferred method; the events are intended more as a backup alternative.
For example, if you make a 2-handled slider and set $scope.myHandles = [0, 100] in your controller before the slider is built and
slider-handle-variable = 'myHandles' in your html where you call the directive,
then when the slider is initialized the handles will be placed at 0 and 100.
From then on, $scope.myHandles[0] will reflect the first handle's value and $scope.myHandles[1] will hold the second's.
yeah, but is there an some kind of event while a slider handle is being dragged ? i know when any of them is being dragged the $scope.myHandles[0] or $scope.myHandles[1] would change, and i can $watch them in my scope , to call any function whenever the handle value changes, but this would also get called when the handles are not actually being dragged, but the value is changed from any of the other methods (using any of the ways to set handle values)
I am able to read the slider handle values using the mouse up event... but i can't find a way to read the value while the handle is being dragged. I am certainly missing something, as i can see the values updating as i move the handles on your demo page. how can i achieve this?
For example, i have a 2 handle slider, and i want to call some code as soon as any 1 of them is dragged and while it is being dragged, so effectively as soon as the value changes. (One way i can think of is to watch the slider variable in my controller)
The text was updated successfully, but these errors were encountered: