Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

cannot separately trap min/max range values #35

Open
zpydee opened this issue Jan 23, 2014 · 1 comment
Open

cannot separately trap min/max range values #35

zpydee opened this issue Jan 23, 2014 · 1 comment

Comments

@zpydee
Copy link

zpydee commented Jan 23, 2014

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?

@yoonchee
Copy link

yoonchee commented Jan 3, 2015

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);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants