https://api.exchangeratesapi.io/latest this is my API. In my .ts I'm doing

this.currencyProvider.GetCurrencyData().subscribe((data) =>{
      this.currency=data.rates
    });

and so does that mean that in my HTML I just have to do something like {{currency.USD}} or is it something else? When I've done this nothing even shows up on the page when I run it

1 Answers

0
Khurshid Ansari On Best Solutions

I found solution for you :

In Component:

public currency; 
this.currencyProvider.GetCurrencyData().subscribe((data:any) =>{
   this.currency=data.rates;
});

In Html:

<div>
{{currency?.USD}}
</div>

Working demo : link