【发布时间】:2018-05-03 07:49:06
【问题描述】:
我正在使用此代码
<mat-table #table [dataSource]="dataSource" matSort >
<ng-container matColumnDef="tache">
<mat-header-cell *matHeaderCellDef mat-sort-header> tâche </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.tache}} </mat-cell>
</ng-container>
<ng-container matColumnDef="outil">
<mat-header-cell *matHeaderCellDef mat-sort-header> outil </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.outil}} </mat-cell>
</ng-container> <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;" (click)="selection.toggle(row)">
</mat-row>
</mat-table>
那么,如何在数据表中显示空消息“No Record found”。
【问题讨论】:
-
您能否详细说明未找到数据的含义?
-
如果数据源为空,我必须显示“未找到记录消息”
标签: angular