#Angular Resize Number Directive
An AngularJS directive to resize the font of a box that has a number that is increasing a lot and messing things up :)
$ bower install angular-resize-number-directive
-
Include the
<script src="angular-resize-number-directive.min.js"></script>in your HTML document. -
Include the
resizeNumberdependency in your Angular module:
angular.module('app', ['resizeNumber']);- Call the directive with its parameters:
<resize-number tag="h1" value="12345678" max-font-size="40" min-font-size="20" default-number-size="5" decrease-rate="2"></resize-number>tag (optional) A container beyond the one made by the directive to wrap the number
value The actual value. It can be a constant value or an expression
max-font-size The max size of the font
min-font-size The min size of the font
default-number-size The length where the directive starts to work on
decrease-rate The decrease rate
MIT