numeral.js

How to use Numeral.js library in angular2/ionic 2 typescript app?

ぐ巨炮叔叔 提交于 2019-12-10 18:23:37
问题 I have been successful using Numeral.js library in my angularJs(1.x) applications to format my numbers in different formats. This is how I use angular1 filters: filter.js .filter('numeral', function () { return function (count) { var numericalFormat = numeral(count).format('0.0a'); return numericalFormat; }; }) For that I followed the official docs of Numeral.js and installed using npm. I also give reference to nodemodules in index.html. In the Browser <script src="node_modules/numeral