luzc08 / angular-count-to

Angular directive to animate counting to a number

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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', ['count-to']);

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.

About

Angular directive to animate counting to a number

License:MIT License


Languages

Language:JavaScript 80.6%Language:HTML 13.0%Language:Ruby 3.1%Language:Batchfile 1.7%Language:Shell 1.4%