DecimalPipe

DecimalPipe

Stable Pipe

What it does

Formats a number according to locale rules.

How to use

number_expression | number[:digitInfo]

Formats a number as text. Group sizing and separator and other locale-specific configurations are based on the active locale.

where expression is a number:

  • digitInfo is a string which has a following format:
    {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
    • minIntegerDigits is the minimum number of integer digits to use. Defaults to 1.
    • minFractionDigits