Updated Version
There’s an updated version of this article here:
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>