I need some help, I'm working on a project in angular on an agenda, but when I try to call the database objects I get the following error:
Can not find a differ supporting object '[object Object]' of type 'object' NgFor only supports binding to Iterables such as Arrays
my service is like this:
getContact() {
return this._http.get(this.url)
.map(res => {
this.contact = res.json();
});
}
and I receive it here:
export class ContactComponent implements OnInit {
constructor(private contactService:ContactService){}
ngOnInit(){
this.contactService.getContact().subscribe();
}
}
that should return me a json with the contacts in my database to then show them in a table but gives the error before said.
how can I solve it?