izupet / angular2-counto

Angular 2 package for nice count animations
MIT License
40 stars 13 forks source link

Simple count? #5

Closed sqnkov closed 7 years ago

sqnkov commented 7 years ago

@izupet, I want to use this just for visual effect reasons, Is there a way to do a simple count up , not a currency , not a timestamp, just a simple number. 1 to 10 > "10" , not "10.00"

And is it possible for this to happen when the user scrolls down to the counter, because right now it starts to count and I cannot see it on page load.

Thanks in advance!

izupet commented 7 years ago

You can count from 1 to 10 without decimal places using Angular build-in decimal pipe like this {{counto | number:'1.0-0'}} or just write custom function that returns counto.toFixed(0) for example.

You should implement scroll spy by yourself or use one of the angular 2 libs that does it for you (there are plenty of them). This package is not intended to support this kind of feature for now.