Home > database >  Currency Pipe CLP with cents, Angular 11
Currency Pipe CLP with cents, Angular 11

Time:10-28

hello guys i need tranform this value 23,769.05 to 23.769,05

in angular 11, searching I found this pipe but it has not worked for me:

enter image description here

enter image description here

please help.

CodePudding user response:

Seems to looks line an en-ES currency format. I suggest to have a look on the Number.toLocaleString() documentation

You can try something like:

transform(value: number): string {
   return (value || 0).toLocaleString('es-ES');
}

Please avoid pasting code images, just use the markdown editor for your code. It's clearly better for helping.

  • Related