![]() |
VOOZH | about |
In this article, we are going to see what is formatNumber in Angular 10 and how to use it.
formatNumber is used to format a number based on our requirement in decimal form.
Syntax:
formatNumber(value, locale, digitsInfo)
Parameters:
Return Value:
NgModule: Module used by formatNumber is:
Approach:
import { LOCALE_ID, NgModule } from '@angular/core';Example 1:
Output:
👁 ImageExample 2:
Output:
👁 ImageExample 3:
Output:
👁 Image