import { Pipe, PipeTransform } from '@angular/core';
import { DecimalPipe, PercentPipe, CurrencyPipe } from '@angular/common';
class myClass{
formattedData( value:string){
let moneyPipe = new CurrencyPipe();
moneyPipe.transform( value, 'USD', true );
}
}
I got error of "Supplied parameters do not match any signature of call target" for the line new CurrencyPipe();
Is there a way to apply build-in pipe programmatically? What's wrong with the code above ?
Thanks.