Skip to content

A simple count-to directive that counts from a number to a number.

License

Notifications You must be signed in to change notification settings

austinthedeveloper/angular-count-to

 
 

Repository files navigation

angular-count-to

A simple count-to directive that counts from a number to a number.

Requirements

  • Angular >= 4.0.0

Installation

npm install angular-count-to --save

In your app.module.ts:

import { CountToModule } from 'angular-count-to';
@NgModule({
    ...
    imports: [CountToModule]
    ...
});

Background

Example

// Controller
count = {
    countTo: 100,
    from: 0,
    duration: 1
};

// Template
<span [CountTo]="count.countTo" [from]="count.from" [duration]="count.duration"></span>

// Write directly to the directive
<span CountTo="100" from="0" duration="10"></span>
Value Required Defaults to
CountTo yes N/a
from no 0
duration no 4

TODOS

  • Write test scripts

License

MIT

About

A simple count-to directive that counts from a number to a number.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.8%
  • TypeScript 26.2%