So I'm working on a mat-table ,My question is how do i hide a certain column(based on *ngIf) or truncate a cell content above 50 chars(i have a custom pipe).
if the column name is xyz hide/truncate. I'm unable to figure out a way and i am absolute newbie to angular any guidance will be very helpful. Thanks in advance
displayedColumns: string[] = ['id','name'];
<ng-container matColumnDef="{{column}}" *ngFor="let column of displayedColumns">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{column}} </th>
<td mat-cell *matCellDef="let element"> {{element[column]}} </td>
</ng-container>
i tried doing this but it didn't work
<ng-container matColumnDef="{{column}}" *ngFor="let column of displayedColumns">
<div *ngIf="column.length > 0 && selectedIssueTab === issueTabs[1] || selectedIssueTab === issueTabs[2]">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{column}} </th>
<td mat-cell *matCellDef="let element"> {{element[column]}} </td>
</div>
</ng-container>
``