WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers.

Formats a number as local text. i.e. group sizing and separator and other locale-specific configurations are based on the active locale.

Usage

expression | number[:digitInfo]

where expression is a number and digitInfo has the following format:

{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
  • minIntegerDigits is the minimum number of integer digits to use. Defaults to 1.
  • minFractionDigits is the minimum number of digits after fraction. Defaults to 0.
  • maxFractionDigits is the maximum number of digits after fraction. Defaults to 3.

For more information on the acceptable range for each of these numbers and other details see your native internationalization library.

Inheritance
  • Object
  • DecimalPipe
Implements
Annotations

Constructors

DecimalPipe()
const

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

transform(value, [ String digits ]) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(other) → bool
The equality operator. [...]
inherited