I'm new to Angular and I have a problem. I want to get data to my graph from my spring boot backend. I send a GET request from my Angular App and I receive empty response despite seeing in the console that it is not empty. Could you help me?
My angular service
getChartData(): Observable<Array<ChartDataParameters>> {
return this.http.get<Array<ChartDataParameters>> ('http://127.0.0.1:8080/currency/chartData');
}
and my component which uses this method
this.databaseService.getChartData().subscribe(d => {
this.data_origin = d;
});
for (let i = 0; i < this.data_origin.length; i++) {
this.data.push([this.data_origin[i].date, this.data_origin[i].prediction, this.data_origin[i].currency]);
}