My code is as follows:
getReport(id_reporte: string, destino: number, departamento: string,
afiliacion: string, tipo_servicio: string, canal: string,
fechai: string, fechaf: string, por: string): Observable <Afiliados[]> {
return this.http.post<Afiliados[]>(
this.url, JSON.stringify(
{
'id_reporte': id_reporte,
'destino': destino
}),
httpOptions);
}
My interface that I receive:
export interface Afiliados {
Nombre: string,
Email: string
}
My invocation of the method:
this.RAfiliados.getReport(this.id , 2, '' , '' , '' , '' , '20170616' , '20180719' , '' )
.subscribe(data => this.ARAfiliados = data);
At the time of touring the arrangement:
<tr *ngFor="let afiliados of ARAfiliados">
<td>{{afiliados.Nombre}}</td><td>{{afiliados.Email}}</td>
</tr>
My answer json:
[
{
"nombre": " ejemplo ",
"email": "[email protected] "
},
{
"nombre": " ejemplo ",
"email": "[email protected] "
}
]
But at the time of seeing the result, it shows me the total size of my answer but I do not separate the information in the table.