I have data returned to me that works just fine
working data is
data: Array(16)
Data that is NOT working is like this
data: Menu1Items: Array(5) > 0 { .... } etc
I am using Angular 5, and so service returns data like this
.map((response: Response) => {
return response;
Then the component intercepts it and console.log works fine
this.arsSevice.getMenu()
.subscribe(
result => {
this.testing = result;
console.log('menu',result);
})
problem is with the data, this screenshot shows the problem, i just don't understand how to fix it with the object vs array?
error message ONLY because of the HTML TEMPLATE
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
HTML Template
<li *ngFor="let item of testing">
Image showing that a call that is similar in architecture with html template loop, component , service the working call is the BOTTOM , component
notice the different compared to the one called menu
that I'm having trouble with?