== Angular 7
- Install NPM ngx counter up
npm install ngx-counter-up --save
- Add CounterUpModule to your app.module.ts
import { CounterUpModule } from 'ngx-counter-up';
@NgModule({
imports: [ CounterUpModule.forRoot() ]
})
- You can use counter-up component like so:
<span counter-up offset="1" number="1000">0</span>
import { CounterUpModule } from 'ngx-counter-up';
@NgModule({
imports: [ CounterUpModule.forRoot({
delay: 1000,
time: 100
}) ]
})
- You can apply complete callback function:
<span counter-up number="10" (complete)="log($event)">9</span>
Please leave your feedback if you have noticed any issues or have a feature request.
The repository code is open-sourced software licensed under the MIT license.