Я пытаюсь отобразить данные в таблице, используя loda sh, используя angular 9, но когда я передаю данные в переменную, это ничего не показывает.
Heare is my Код
Component.ts
list =[]
constructor(private apiservice: ApiServiceService) {}
ngOnInit(): void {
this.apiservice.filterData().then(resData => {
_.forEach(resData, boxes => {
_.forEach(boxes, data => {
_.forEach(data, val => {
if(val.name === 'GIP_asOfDate'){
_.forEach(val, asOfDate =>{
_.forEach(asOfDate, asd =>{
this.list = asd;
// console.log(this.list)
// console.log(asd.Name)
// console.log(asd.Count)
})
})
}
});
});
});
});
}
компонент. html
<table>
<thead>
<tr>
<th>As of Date</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of list">
<td>{{item.Name}}</td>
<td>{{item.Count}}</td>
</tr>
</tbody>
</table>