I'm using angular decimalPipe
https://angular.io/api/common/DecimalPipe
What I need is at least one Integer, and from 0 to 2 decimals, so, following the link, it is
number: '1.0-2'
If I use it in a label, as static value, it works fine, my problem is using it in an input, the pipe does not work properly
It is included in an input, it works if the third decimal is 5 or higher, but not if it is lower, here is a working example:
https://stackblitz.com/edit/angular-tlesbo?file=src%2Fapp%2Fapp.component.html
<input type="number" matInput
[ngModel]="value | number:'1.0-2'" (ngModelChange)="value=$event" />
Test including for example 2.5222 it won't be formated and keeps at it is, but 2.548 will be and is modify to 2.55.
Am I using bad the pipe?