A countUp.js integration for Ember
ember install ember-countup
Basic example
Full example, showing default values
Example using formattingFn
customFormatting: function(nStr) {
// I get called on every count up step
}
Example using easingFn
customEasing: function(t, b, c, d) {
var ts = (t /= d) * t;
var tc = ts * t;
return b + c * (1.77635683940025e-15 * tc * ts + 0.999999999999998 * tc + -3 * ts + 3 * t);
}
Example using the onComplete callback
actions: {
showMessage() {
alert('count up done');
}
}
Check out the dummy app for a working example.
Style a span
with the class .ember-countup
:
<span id="ember389" class="ember-view ember-countup">42</span>