Skip to content

Conversation

@edzius
Copy link

@edzius edzius commented Jun 26, 2014

Useful to have such thing when slider ranges is not known on initialization or they are changed during runtime. Most of sliders providers have such feature. Would be great to have it in this wrapper.

I am not sure if it is the right way to do it but angular scope.$watch()'es fits here. On the other hand attrs.$observe() might be more performance friendly way. Also default default range min/max values should be set. Using those 0/100 respectively.

Default range min/max values set to be 0/100 respectively. Those ranges
and step is updated on change using angular scope.$watch()'es.
@smarquez1
Copy link

+1 Please merge. Works fine.

Fixes slider change from model bug (slider change to X second time fails):
Slide to value X -> Model change to value Y -> Model change to value X.
@edzius
Copy link
Author

edzius commented Oct 4, 2014

I haven't had this issue with single knob slider. However it might be a problem on some browsers due to unsafe equality to "null" check. Better approach here is to use "angular.isUndefined()".

@smarquez1
Copy link

Sorry for the late response. Your code worked just fine, it was me not initiating the ngFrom and ngTo variables when the controller was loaded. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants