i create one PHP web API,where i get response from API ok, but result not display on viewfollowing is response which i get from Web APIHide Copy Code
{
"status": true,
"data": {
"statistics": [
{
"State": "Karnataka",
"SurveyorName": "Keval Kakdiya",
"NoOfInt": "2",
"SampleReceived": "2",
"CancelledEntries": "0",
"Approved": "1",
"DisApproved": "1"
},
{
"State": "MAHARASHTRA",
"SurveyorName": "Keval Kakdiya",
"NoOfInt": "0",
"SampleReceived": "0",
"CancelledEntries": "1",
"Approved": "0",
"DisApproved": "0"
}
],
}
}in angular i create one array and pass above response to that array// following is angular codeHide Copy Code
result:any =[];
Hide Copy Code
this.result = response;
// following is html codeHide Copy Code
<tr *ngFor="let report of result.data.statistics;">
<td> {{report.SurveyorName}} </td>
<td> {{report.NoOfInt}} </td>
<td> {{report.CancelledEntries}} </td>
<td> {{report.Approved}} </td>
<td> {{report.DisApproved}} </td>
<td> {{report.State}}</td>
<td> <button class="btn-dark" type='button'> View </button></td>
</tr>