Skip to content

Lightweight plugin for AngularJS 1.5.x without any dependencies

License

Notifications You must be signed in to change notification settings

dmitriy-borisov/angular-countup

Repository files navigation

angular-countup

Lightweight plugin for AngularJS 1.5.x without any dependencies for smooth changing the scope numbers

Installation

NPM:

npm install angular-countup --save

Include the file to your page after angular, like so:

<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
    <script src="path_to_folder/angular-countup.min.js"></script>
</head>

Add the module name to your main app file, for example:

angular.module('myApp', [
    ...
    'countUp'
])

Usage

<count-up ng-model="myvalue"></count-up>

myvalue is a $scope.myvalue in your controller

Additional attributes:

  • time - total time of increase from old value to new value. Default 1000 (1 second);
  • steps - frame count. Default 10;
  • decimals - count of numbers after dot. Default 0;
  • before - text before the value. Default: none;
  • after - text after the value. Default: none;

Demo

JSFiddle

About

Lightweight plugin for AngularJS 1.5.x without any dependencies

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published