Format Currency in Angular

In Angular, to format a currency, use the currency pipe on a number as shown here.

<tr *ngFor="#item of data"> <td><a href="#">{{ item.invoiceNo }}</a></td> <td>{{ item.invoiceDate }}</td> <td>{{ item.invoiceStatus }}</td> <td class="right aligned">{{ item.invoiceTotal | currency:'USD':true:'1.2-2' }}</td> </tr>

Note, however, that the currency pipe relies on the Internationalization API, which is not available in all browsers. See current browser support for Internationalization API.

Here’s a visual example of what the example shown above renders when used on a decimal number: