npm i ng-count-up-js
import { CountUpModule } from 'ng-count-up-js';
..........
@NgModule({
..........
imports: [
CountUpModule,
..........
]
})
<div appCountUp [endVal]="endVal" [duration]='0.1'></div>
- endVal: the number to count to
- duration: Optional duration of the animation in seconds. Default is 2.
- startVal: (Number) Optional start value for the count. Defaults to zero.
- decimals: Optional number of decimal places. Default is 2.
- complete