mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4713] Add new DecimalNumber Pipe to transform and localize numbers (#4926)
* [ADF-4713] Add new DecimalNumber Pipe to transform and localize numbers * Unsubscribe from userPreference service * Make Pipe impure * Add documentation in localization page
This commit is contained in:
committed by
Eugenio Romano
parent
8ee5cd1908
commit
a0d4160c11
@@ -10,6 +10,7 @@ Dates are not written the same around the world. That is where localizing a date
|
||||
- [Adding language support](#adding-language-support)
|
||||
- [Using the localized date pipe](#using-the-localized-date-pipe)
|
||||
- [Using the time ago pipe](#using-the-time-ago-pipe)
|
||||
- [Using the decimal number pipe](#using-the-decimal-number-pipe)
|
||||
|
||||
## Setting up the configuration in your app
|
||||
|
||||
@@ -71,4 +72,19 @@ Converts a recent past date into a number of days ago.
|
||||
|
||||
Usage of the [time ago pipe](../core/pipes/time-ago.pipe.md).
|
||||
|
||||
## Using the decimal number pipe
|
||||
|
||||
Localizes the punctuation marks of a given number.
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
{{ number | adfDecimalNumber }}
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
`Input:` 1999.12
|
||||
`Output (english locale):` 1,999.12
|
||||
`Output (italian locale):` 1.999,12
|
||||
|
||||
Usage of the [decimal number pipe](../core/pipes/decimal-number.pipe.md).
|
||||
|
||||
Find more info about localization in the [Angular Docs](https://angular.io/guide/i18n#setting-up-the-locale-of-your-app).
|
||||
|
Reference in New Issue
Block a user