ui-slider icon indicating copy to clipboard operation
ui-slider copied to clipboard

cannot separately trap min/max range values

Open zpydee opened this issue 11 years ago • 1 comments

I would like to be able to access the min/max values of your range slider separately, but currently cannot establish how that's done?

zpydee avatar Jan 23 '14 16:01 zpydee

You can do something like:

<div ui-slider="..." ng-model="range"></div>
<input type="text" ng-model="range[0]" />
<input type="text" ng-model="range[1]" />

Current code does not deep watch the model, meaning changes in model won't trigger $render on ui-slider div. You can add $watch in the directive to deep watch the model, i.e., watch the change in the array values.

For example:

scope.$watch('range', function() {
  ctrl.$render();
}, true);

yoonchee avatar Jan 03 '15 02:01 yoonchee