Hi
Below is the data returned.I am trying below Html. I want to display only Name & Email.
In List Data there are more than 2 columns like Id,Name,Email,Contact No. etc.
<ng-container *ngFor="let column of displayedColumns" [matColumnDef]="column"> <th mat-header-cell *matHeaderCellDef>{{ column }}</th> <td mat-cell *matCellDef="let element">{{ element[column] }}</td> </ng-container> <!-- Header Row --> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <!-- Data Rows --> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
@Input() arrChildHead: string[] = []; @Input() lstChild: any[] = []; In arrChildHead it has 2 fields Name,Email. In Lstchild it is data which is returned through API.
Thanks