How can I render this array of objects in Angular?
var list = [{
collaborators: [{
id: 1,
name: "test"
}]
},
{
colleagues: [{
id: 2,
name: "colleague2"
}]
}
]
I tried in this way
<div *ngFor="let el of list">
<div *ngFor="let e of el.collaborators">
{{e.id}}
</div>
</div>
But it doesn't work
collaboratorsandcolleagues. And inHTMLyou are accessing onlycollaborators.