本组件适用于 Angular2 及以上版本。
npm install angular4-counter-up --save
import { CounterUpModule } from 'angular4-counter-up';
@NgModule({
imports: [ CounterUpModule.forRoot() ]
})
<span counter-up offset="1" number="1000">0</span>
import { CounterUpModule } from 'angular4-counter-up';
@NgModule({
imports: [ CounterUpModule.forRoot({
delay: 1000,
time: 100
}) ]
})
<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.