Skip to content
Angular directive to animate counting to a number
Branch: master
Clone or download
Latest commit 5b21e81 Jul 16, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
build
config
demo
node_modules
scripts
src
test initial repo creation and code addition Jul 3, 2013
.gitattributes
.gitignore
Gruntfile.js
LICENSE
README.md
package.json updating ignores. Adding built file version Jul 16, 2013

README.md

Angular Count-To

This project is an animated counter for Angularjs. The directive counts from one number to another over a configured duration. Demo

How to use angular count-to

Include the javascript file.

<script src="angular.count-to.min.js"></script>

Inject the count-to directive in your app.

var myApp = angular.module('myApp', ['countTo']);

Apply the directive to a dom element.

 <span count-to="{{countTo}}" value="{{countFrom}}" duration="4"></span>

Attributes

The following attributes can be set as numbers on the directive element.

  • count-to the number to count to.
  • value the number to start counting from.
  • duration how long the count should take in seconds.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.