formatNumber
function
Formats a number as text, with group sizing, separator, and other parameters based on the locale.
API
Description
function formatNumber( value: number, locale: string, digitsInfo?: string | undefined): string;
formatNumber
string
Formats a number as text, with group sizing, separator, and other parameters based on the locale.
@paramvalue
number
The number to format.
@paramlocale
string
A locale code for the locale format rules to use.
@paramdigitsInfo
string | undefined
Decimal representation options, specified by a string in the following format:
{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
. See DecimalPipe
for more details.
@returns
string
Jump to details