I pulled the data from laravel api like this
this.dataService.geData().subscribe(res=>{
this.contacts=res
});
{
"status":true,
"contacts":
[
{"id":1,"name":"Christopher","email":"[email protected]"},
{"id":2,"name":"Anthony","email":"[email protected]"},
{"id":3,"name":"John Lenon","email":"[email protected]"}
]
}
I tried this but it is not displaying anything
<tbody>
<tr *ngFor="let contact of contacts">
<td>{{contact.id}}</td>
<td>{{contact.name}}</td>
<td>{{contact.email}}</td>
</tr>
</tbody>