How would I display data from an array of arrays within Angular using *ngFor
?
app.component.ts
list = {
"one": [
{
"name": "a",
"active": false
},
{
"name": "b",
"active": false
}
],
"two": [
{
"name": "c",
"active": false
},
{
"name": "d",
"active": false
}
]
};
app.component.html
<div *ngFor="let item of list">
<div *ngFor="let data of item">
{{data.name}}
</div>
<div>
The nesting of *ngFor
s doesn't appear to work in this case, but I cannot figure out why.