export class DecimalPipe
export class DecimalPipe
exported from angular2/common defined in angular2/src/common/pipes/number_pipe.ts (line 58)
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.
Example
Annotations
@Pipe({name: 'number'})
@Pipe({name: 'number'})
@Injectable()
@Injectable()
Members
transform(value: any, args: any[]) : string
transform(value: any, args: any[]) : string
Not Yet Documented