Closed bradgreens closed 10 years ago
As an example of my temporary solution, I add scope.$emit('slideCompleted', scope.ngModel);
to the bottom of the onEnd
function to give myself a callback.
Ok I figured out the "right" way. In my case I went with -
ng-change="handleSliderChange(slider.model)"
where handleSliderChange
and slider.model
are both available on the current scope.
Maybe I'm missing this due to the sparse documentation. Is there a slide completed event which would contain the model/position value(s) of the slider?
I tried doing
$scope.$watch( 'slider.model', fct )
but it fires while the user is actively sliding. I need to run a test when the slide operation is entirely complete (specifically after the directive runs theupdateDOM
code.