I am using CurrencyPipe with my application,
The following works,
<div class="price">{{123 | currConvert | currency:'USD':true:'3.2-2'}}</div>
Now i have to pass the currency from the model variable, this is what i am doing,
ngOnInit() {
this.selectedCurrency = 'USD';
}
and in template,
<div class="price">{{123 | currConvert | currency:{{selectedCurrency}}:true:'3.2-2'}}</div>
it gives me a template parse error. what is the issue.
Don't nest {{}}
<div class="price">{{123 | currConvert | currency:selectedCurrency:true:'3.2-2'}}</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With