Closed ElanHasson closed 9 years ago
hi @ElanHasson,
looks like angular team wants to kill me ;)
can you reproduce it with this fiddle by injecting 1.3.8, if I got time I do it too.
http://jsfiddle.net/darul75/g9e9n8xc/
thx
I've added 1.3.8, but still trying to reproduce. http://jsfiddle.net/9fvp275x/
Something is happening to the value between assignment of to and from and ngModel and call to calculate()
can you send me your calculate method content and options pls I will try reproduce it tomorrow, thx
@darul75 Thanks.. here you go.
$scope.defaultAmount=190000;
$scope.coverageASliderOptions = {
from: $scope.defaultAmount,
to: $scope.defaultAmount+ ($scope.defaultAmount* 0.20),
step: 500,
calculate: function(value) {
return $filter('currency')(value, '$', 0);
}
};
<input ng-model="data.quote.coverages.coverageA" type="text" id="mySlider1"
slider options="coverageASliderOptions" />
Ok nice I check asap and keep you informed
jquery dependency was still there. thx for reporting it, https://github.com/darul75/ng-slider/releases/tag/2.0.9
So you were able to reproduce and resolve?
Can you check fiddle I have update code, there was a last jquery dependency call when providing function option.. But no I have not reproduced exactly your case.
Confirme me if you still have issue, thx
I still have the issue. Must be some side effect somewhere.. Odd because that 0.20 is the only multiplication I am performing.
I'll let you know. On Jan 1, 2015 2:22 PM, "Julien Valéry" notifications@github.com wrote:
Confirme me if you still have issue, thx
— Reply to this email directly or view it on GitHub https://github.com/darul75/ng-slider/issues/47#issuecomment-68495365.
I do not see any problem here, "from" is set to 190000 and "to" to 228000 see third last slider in this fiddle : http://jsfiddle.net/g9e9n8xc/6/ help me reproduce it ;)
Ok-- the issue was actually caused by concatenating my numerics as strings.
parseInt() fixed it.
good news, do you think I need to change something, was it involved by this affectation :
scope.defaultAmount+ ($scope.defaultAmount* 0.20),
perhaps be safe and wrap $scope.defaultAmount in parseInt
I updated angular to 1.3.8 and now the slider multiplies the value.
For example, I set min to 190,000 and max to 228,000 and any touch to the slider multiplies the current value making the number huge, and outside of the range.