ngx-counter
Customizable counter component for Angular 2+
Installation
To install this library, run:
$ npm install ngx-counter --save
Usage
And then from your Angular AppModule
:
;; ; // Import the library;
Once the library is imported, you can use its component in your Angular application:
<!-- You can now use the library component in app.component.html --> {{title}}
Model binding
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
countValue | number | 0 |
Count value that will be incremented |
limit | number | countValue + 10 |
Limit where counting will stop |
speed | number | 1000 |
Speed of the counter in milli-seconds |
change | event | noop |
The callback function for each count change |
size | string | medium |
Size of the counter display 'small', 'medium', 'big', 'large', 'xl' |
font | string | monospace |
Font family to use |
theme | string | blue |
Color theme 'blue', 'red', 'green', 'gray' |
color | string | blue |
Main color for the number and the border (if no theme specified) |
bgcolor | string | #d6f0f9 |
Background color to use (if no theme specified) |
Examples
License
MIT © Kris Nyunt