Closed funnygerman closed 9 years ago
I guess, this is the jsfiddle http://jsfiddle.net/g9e9n8xc/143/
are you using "realtime" option, if not ok. can you invert changing options first then value and tell me if it is still wrong.
$scope.sloptions = {
from: range[property].min,
to: range[property].max,
step: 1,
dimension: ""
};
$scope.slvalue = range[property].min+";"+range[property].max;
If you didn't change slider values manually, then the button works only once. Otherwise the suggested solution doesn't work. Or better to say suggested solution doesn't work. You can also see this problem in the your jsfiddle link you sent.
I am trying something similar and facing the same issue. Is it fixed for you now?
For me the button works multiple times until I change the value using slider. Once I change the value using slider everything is screwed. Please help me.
Sure guys there is a bug, on big holidays I have to fix it when back. Sorry for delay in responses.
Hi Julien,
Sorry to bother you again. Can you please give a timeline for this fix. My app is currently dependent on these fixes.
Regards, Samdani Shaik.
I might have time to look on sunday night ;) hope I will find where is issue
That sounds good.
Thanks Julien.
hi @funnygerman, @samdanishaik
problem is not about directive but how we use scope here, and is a common mistake we often make with string that are immutable and how scope uses javascript prototypal inheritance
just replace:
$scope.slvalue = "1;100";
by
$scope.slvalue = {
value:"1;100"
};
// later in directive template
<input ng-model="slvalue.value" type="text" id="mySlider1" slider options="sloptions" /></div>',
http://jsfiddle.net/darul75/z4eugwo7/6/
it is fine for you both ?
That's great finding Julien.. Thanks for fixing it. It works awesome!!
Thank you, also worked for us
cool
I use your widget ng-slider. And I try to change the values (I use range values) and options also from the code depending on some user actions.
It seems that options will be refreshed, because I see everytime new bounds. But the value (the range) remains the same.
That is my code snippet: