Angular Number Formatter for Angular 2+ (including Angular 6, 8, 11). Formats numbers into human-readable strings with options: default (metric symbol like 37.5K), metrics-symbol, metrics-name (e.g., 37.5 thousands), comma-separated, and emoji representation. Works with integers, floats, negative numbers, and numeric strings. Stable version 3.2.1; last tested with Angular 11 but compatible with later versions. Differentiator: includes emoji formatting not found in similar libraries.
npm install ng-number-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Import the module and use the component with ngNumber and optional ngFormat inputs.
Always use [ngNumber] (camelCase) as input binding.
Add NgNumberFormatterModule to the imports array of the NgModule where the component is used.
For compact emoji, manually remove spaces via string replacement.
Use exact string values listed above; consider defining a type or constant.
Import NgNumberFormatterModule in your NgModule imports array.
Import NgNumberFormatterModule only in the root module (e.g., AppModule) and use it in child modules via forChild or simply re-export.
Add NgNumberFormatterModule to your module imports.