Open daniel-halldorsson opened 10 years ago
It was created with couting to and from whole numbers in mind.
I'll look into supporting floats.
When this supports floats it will do great things for my project. I can't wait!
https://github.com/charlesharvey/angular-count-to/blob/master/src/count-to.js
i made a version which supports floats, and returns numbers to 2 decimal places.
Thanks charlesharvey>
BTW, a small fix to the above script (line 32)
e.innerHTML = parseFloat(Math.round(num * 100) / 100).toFixed(2) ;
thanks @kaushalye. Fixed now!
Probably in a similar way, it could provide support for filters. Using $filter('number')
to let angular handle the formatting.
the one support float is great
this one doesn't support float still I asume. I'll try @charlesharvey 's
count-to converts any input to integers, not always desirable.