I have data returned to me that works just fine
working data is
data: Array(16)
Data that is NOT working is like this
I think you need to set testing = result.data, and iterate through that.
this.arsSevice.getMenu()
.subscribe(
result => {
this.testing = result.data;
})
this will give you access to the array in 'data'
I tried to change the shape of the data, and this worked for me. Hopefully it works for you...
var data={
menu1Items:[{key:"boo", key2:"hoo"}],
menu2Items:[{key:"boo2", key2:"hoo2"}]
}
var tempData:any[]=[];
for(var key in data){
if(data.hasOwnProperty(key)){
tempData.push(data[key]);
}
}
this.data = tempData;
}
In your template:
-
{{menuItem.key}} / {{ menuItem.key2}}