I'm facing a problem while I want to display some values which I got from a API call in a dropdown in the fronted.
I call my endpoint like this:
component.ts
ngOnInit() {
const values = this.backendService.getAllValues().subscribe()
}
The call works, I get the following output:
0: {name: "Data Visualisation",…}
name: "Data Visualisation"
1: {name: "Watchning TV",…}
name: "Watchning TV"
Now, I d'like to display those values in my dropdowon:
component.html
<scs-dropdown>
<scs-dropdown-item *ngFor="let value of values" [value]="value.name">
</scs-dropdown-item>
</scs-dropdown>
But nothing is displayed in the dropdown, what do I wrong?