2017-09-27 16:40:59 +00:00
|
|
|
<div class="example-container mat-elevation-z8">
|
2017-10-10 13:37:14 +00:00
|
|
|
<mat-table #table [dataSource]="dataSource" matSort>
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<!--- Note that these columns can be defined in any order.
|
|
|
|
The actual rendered columns are set as a property on the row definition" -->
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<!-- ID Column -->
|
|
|
|
<ng-container matColumnDef="userId">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> ID</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let row"> {{row.id}}</mat-cell>
|
|
|
|
</ng-container>
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<!-- Progress Column -->
|
|
|
|
<ng-container matColumnDef="progress">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Progress</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let row"> {{row.progress}}%</mat-cell>
|
|
|
|
</ng-container>
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<!-- Name Column -->
|
|
|
|
<ng-container matColumnDef="userName">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Name</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let row"> {{row.name}}</mat-cell>
|
|
|
|
</ng-container>
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<!-- Color Column -->
|
|
|
|
<ng-container matColumnDef="color">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Color</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let row" [style.color]="row.color"> {{row.color}}</mat-cell>
|
|
|
|
</ng-container>
|
2017-09-27 16:40:59 +00:00
|
|
|
|
2017-10-10 13:37:14 +00:00
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
|
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
|
|
|
</mat-table>
|
2017-09-27 16:40:59 +00:00
|
|
|
</div>
|