Formatting Your Angular Number to 2 Decimal Places | Task

Ole Ersoy
Feb - 14  -  1 min

Scenario

We have a number 12.45343532.

We want it to look like this: 12.45.

Approach

Within the component template pipe the value through the number pipe like this:

<div>{{ value | number:'1.2-2' }}</div>

Demo