Hello angular friends,
I\'m working on an angular2 app (multiple actually). And I live in the Netherlands.
Currently I\'m formatting my currency with the followi
I'm too late but I found a solution.
I'm just create a pipe to replace anything:
import { PipeTransform, Injectable, Pipe } from '@angular/core';
@Pipe({
name: 'replace'
})
@Injectable()
export class ReplacePipe implements PipeTransform {
constructor(){}
transform(item: any, replace, replacement): any {
if(item == null) return "";
item = item.replace(replace, replacement);
return item;
}
}
I used that twice to solve your case.
{{ 5.01999 | currency:'BRL':true | replace:'.':',' | replace:',00':',-' }}}