• 개요
@angular/common

formatPercent

함수
안정화

Formats a number as a percentage according to locale rules.

API

function formatPercent(
  value: number,
  locale: string,
  digitsInfo?: string | undefined,
): string;
@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

The formatted percentage value.

설명

Formats a number as a percentage according to locale rules.

다음 모듈에서 내보냄

상세 내용으로 이동