I came across a dataset that resembles the following:
https://i.sstatic.net/S0YyO.png
Within my app.component.html
, I have written this code snippet:
<ul>
<li *ngFor="let data of myData">{{data.id}}</li>
</ul>
However, when I execute this code, it only displays empty lists, resulting in numerous dots from the <li>
tags.
In my app.component.ts
file, I declared:
myData;
Followed by:
this.myData = obj; // Obj contains the data
How can I resolve this issue?