I am trying to use ngFor
loop to get data from my array. I get this
"Cannot find a differ supporting object '[object Object]' of type 'object'.NgFor only supports binding to Iterables such as Arrays".
How can I fix it?
how i get data
if (this.resources$) {
this.resources$.subscribe(result => {
if (result) {
this.resourcesList = <Resources[]>result;
this.showResources = true;
}
});
export interface Resources {
Id: number;
Name: string;
}
I am trying to use it like that
<div *ngFor="let res of resourcesList">{{res.Name}}</div>