I currently have a number with decimal points like --> 1.33
My goal is to convert this value so that instead of a dot, a comma is displayed.
Initially, I attempted this using a custom pipe but unfortunately, it did not yield the desired result.
{{getMyValue() | number:'1.2-2' | commaConvert}}
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({name: 'commaConvert'})
export class CommaConvertPipe implements PipeTransform {
transform(value: number) {
return value+"".replace(".", ",")
}
}
Alternatively, I experimented with solely using the commaConvert pipe.