angular-count-to icon indicating copy to clipboard operation
angular-count-to copied to clipboard

Doesn't handle floats

Open daniel-halldorsson opened this issue 10 years ago • 8 comments

count-to converts any input to integers, not always desirable.

daniel-halldorsson avatar Apr 08 '14 03:04 daniel-halldorsson

It was created with couting to and from whole numbers in mind.
I'll look into supporting floats.

sparkalow avatar Apr 09 '14 16:04 sparkalow

When this supports floats it will do great things for my project. I can't wait!

Shawful avatar May 06 '14 17:05 Shawful

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.

charlesharvey avatar Nov 08 '14 18:11 charlesharvey

Thanks charlesharvey> BTW, a small fix to the above script (line 32) e.innerHTML = parseFloat(Math.round(num * 100) / 100).toFixed(2) ;

kaushalye avatar Apr 30 '15 07:04 kaushalye

thanks @kaushalye. Fixed now!

charlesharvey avatar Apr 30 '15 07:04 charlesharvey

Probably in a similar way, it could provide support for filters. Using $filter('number') to let angular handle the formatting.

miguelrincon avatar Sep 23 '15 09:09 miguelrincon

the one support float is great

readygosports avatar Jul 26 '16 07:07 readygosports

this one doesn't support float still I asume. I'll try @charlesharvey 's

johhansantana avatar Apr 12 '17 16:04 johhansantana