The Wayback Machine - https://web.archive.org/web/20260113222638/https://angular.dev/api/common/formatPercent
    • Overview
@angular/common

formatPercent

function
stable

Formats a number as a percentage according to locale rules.

API

function formatPercent(  value: number,  locale: string,  digitsInfo?: string | undefined,): string;

formatPercent

string

Formats a number as a percentage according to locale rules.

@paramvaluenumber

The number to format.

@paramlocalestring

A locale code for the locale format rules to use.

@paramdigitsInfostring | undefined

Decimal representation options, specified by a string in the following format: {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. See DecimalPipe for more details.

@returnsstring

Description

Formats a number as a percentage according to locale rules.


Exported by

Jump to details
HTTPS · web.archive.org
← Home