I have a little question, how to replace the "dot" with a "comma", in the quantity field?
Instead of getting 587.00, I want to obtain 587,00.
I have no idea how to convert this?
Here is my code for now:
HTML
<tr *ngFor="let line of osts">
...
<td scope="row" class="text-end">{{ line.QUANTITY | variableFormatNum: "1.2-2" }}</td>
...
</tr>
variable-format-num.pipe.ts
import { DecimalPipe } from '@angular/common';
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'variableFormatNum' })
export class VariableFormatNumPipe implements PipeTransform {
constructor(private decimalPipe: DecimalPipe) {
}
transform(input: number | string | null | undefined, digitsInfo?: string): string | null {
return this.decimalPipe.transform(input, digitsInfo);
}
}
Thank you in advance.
