Guest User

Untitled

a guest
Oct 20th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <div class="example-container mat-elevation-z8">
  2. <div class="example-header">
  3. <mat-form-field floatPlaceholder="never">
  4. <input matInput #filter placeholder="Filter users">
  5. </mat-form-field>
  6. </div>
  7.  
  8. <mat-table #table [dataSource]="dataSource">
  9.  
  10. <!--- Note that these columns can be defined in any order.
  11. The actual rendered columns are set as a property on the row definition" -->
  12.  
  13. <!-- ID Column -->
  14. <ng-container matColumnDef="userId">
  15. <mat-header-cell *matHeaderCellDef> ID </mat-header-cell>
  16. <mat-cell *matCellDef="let row"> {{row.id}} </mat-cell>
  17. </ng-container>
  18.  
  19. <!-- Progress Column -->
  20. <ng-container matColumnDef="progress">
  21. <mat-header-cell *matHeaderCellDef> Progress </mat-header-cell>
  22. <mat-cell *matCellDef="let row"> {{row.progress}}% </mat-cell>
  23. </ng-container>
  24.  
  25. <!-- Name Column -->
  26. <ng-container matColumnDef="userName">
  27. <mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
  28. <mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
  29. </ng-container>
  30.  
  31. <!-- Color Column -->
  32. <ng-container matColumnDef="color">
  33. <mat-header-cell *matHeaderCellDef> Color </mat-header-cell>
  34. <mat-cell *matCellDef="let row" [style.color]="row.color"> {{row.color}} </mat-cell>
  35. </ng-container>
  36.  
  37. <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
  38. <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
  39. </mat-table>
  40. </div>
  41.  
  42. <ng-container matColumnDef="userId">
  43. <mat-header-cell *matHeaderCellDef> ID </mat-header-cell>
  44. <mat-cell *matCellDef="let row"> {{row.id}} </mat-cell>
  45. </ng-container>
  46.  
  47. ERROR Error: cdk-table: Could not find column with id "userId".
Add Comment
Please, Sign In to add comment