Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 957 Bytes

README.md

File metadata and controls

44 lines (35 loc) · 957 Bytes

angular-countUp

AngularJS directive for countUp

A simple Angularjs directive for countUp.js.

see https://github.com/inorganik/countUp.js

Install

  1. Make sure the CountUp.js is loaded.
  2. Include the angular-countUp.js script into your app.
  3. Add countUp as a module dependency to your app.

Usage

Put the countup tag into your html.

<countup startval="countup.startval"
	endval="countup.endval"
	duration="3"
	decimals="0"
	options="countup.options">
</countup>

Making a countUp instance

angular.module('myApp', ['countUp']).controller('myCtrl', function($scope) {
	$scope.countup = {
		startval: 100,
		endval: 0,
		// default options
		options: {
			useEasing : true, 
			useGrouping : true, 
			separator : ',', 
			decimal : '.' 
		}
	};
});