Ceil is equal to NaN after changing the state
See original GitHub issueThe first time the slider works fine, but when I leave the state and come back to it, the slider freezes (ceil not correct it is NaN),
I tried $timeout(function () { $scope.$broadcast('rzSliderForceRender'); });
but it did not solve the problem.
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Why does isNaN(" ") (string with spaces) equal false?
When the argument to the isNaN function is not of type Number, the value is first coerced to a Number. The resulting value...
Read more >NaN - JavaScript - MDN Web Docs
The global NaN property is a value representing Not-A-Number. ... When NaN is one of the operands of any relational comparison ( >...
Read more >numpy.nan_to_num — NumPy v1.24 Manual
Replace NaN with zero and infinity with large finite numbers (default behaviour) or with the ... This means that Not a Number is...
Read more >Math.Ceiling Method (System) | Microsoft Learn
If a is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned. Note that this method returns a Double instead of an...
Read more >Mathematical functions | BigQuery - Google Cloud
All mathematical functions have the following behaviors: They return NULL if any of the input parameters is NULL . They return NaN if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Other solution to fix this is using the ngIf directive with a flag in the rzslider directive:
<rzslider ng-if="ctrl.slider.isVisible" rz-slider-model="ctrl.slider.value"></rzslider>Hey @ainouss , I just had the same problem. The solution for me was to move the init of the options object from postLink to preLink. Don’t know if this works in your case, but give it a try. In short, I went from this:
to this: