【发布时间】:2020-08-28 16:06:20
【问题描述】:
我已经用代码创建了一个动态材质表
<mat-table matSort [dataSource]="dataSource">
<ng-container [matColumnDef]="col" *ngFor="let col of displayedColumns">
<mat-header-cell mat-sort-header *matHeaderCellDef>
{{col | uppercase}}
</mat-header-cell>
<mat-cell *matCellDef="let element">
{{element[col]}}
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"
[ngClass]="row.SEQ % 4 == 0 ? 'rows' : 'row'"></mat-row>
</mat-table>
我的输出看起来像 -
[![在此处输入图片描述][1]][1]
我想访问名为 xyz 的行,以便在列名下方添加一个小按钮来执行某些功能。
类似的东西-
我怎样才能访问它?谁能帮忙。
【问题讨论】:
标签: angular