DecimalPipe class

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

$pipe.number(expression, [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.

Annotations

Constructors

DecimalPipe()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform(num? value, [String? digits]) String?

Operators

operator ==(Object other) bool
The equality operator.
inherited