Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="example-container mat-elevation-z8">
- <div class="example-header">
- <mat-form-field floatPlaceholder="never">
- <input matInput #filter placeholder="Filter users">
- </mat-form-field>
- </div>
- <mat-table #table [dataSource]="dataSource">
- <!--- Note that these columns can be defined in any order.
- The actual rendered columns are set as a property on the row definition" -->
- <!-- ID Column -->
- <ng-container matColumnDef="userId">
- <mat-header-cell *matHeaderCellDef> ID </mat-header-cell>
- <mat-cell *matCellDef="let row"> {{row.id}} </mat-cell>
- </ng-container>
- <!-- Progress Column -->
- <ng-container matColumnDef="progress">
- <mat-header-cell *matHeaderCellDef> Progress </mat-header-cell>
- <mat-cell *matCellDef="let row"> {{row.progress}}% </mat-cell>
- </ng-container>
- <!-- Name Column -->
- <ng-container matColumnDef="userName">
- <mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
- <mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
- </ng-container>
- <!-- Color Column -->
- <ng-container matColumnDef="color">
- <mat-header-cell *matHeaderCellDef> Color </mat-header-cell>
- <mat-cell *matCellDef="let row" [style.color]="row.color"> {{row.color}} </mat-cell>
- </ng-container>
- <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
- <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
- </mat-table>
- </div>
- <ng-container matColumnDef="userId">
- <mat-header-cell *matHeaderCellDef> ID </mat-header-cell>
- <mat-cell *matCellDef="let row"> {{row.id}} </mat-cell>
- </ng-container>
- ERROR Error: cdk-table: Could not find column with id "userId".
Add Comment
Please, Sign In to add comment