VSCode-Angular-TypeScript-Snippets icon indicating copy to clipboard operation
VSCode-Angular-TypeScript-Snippets copied to clipboard

Request for snippet m-table display flex

Open Toso82 opened this issue 4 years ago • 2 comments

https://material.angular.io/components/table/overview#tables-with-code-display-flex-code-

<mat-table [dataSource]="dataSource">
  <!-- User name Definition -->
  <ng-container cdkColumnDef="username">
    <mat-header-cell *cdkHeaderCellDef> User name </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.username}} </mat-cell>
  </ng-container>

  <!-- Age Definition -->
  <ng-container cdkColumnDef="age">
    <mat-header-cell *cdkHeaderCellDef> Age </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.age}} </mat-cell>
  </ng-container>

  <!-- Title Definition -->
  <ng-container cdkColumnDef="title">
    <mat-header-cell *cdkHeaderCellDef> Title </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.title}} </mat-cell>
  </ng-container>

  <!-- Header and Row Declarations -->
  <mat-header-row *cdkHeaderRowDef="['username', 'age', 'title']"></mat-header-row>
  <mat-row *cdkRowDef="let row; columns: ['username', 'age', 'title']"></mat-row>
</mat-table>

Toso82 avatar Dec 28 '19 14:12 Toso82

Good idea, let me know if you want to work on a pr with changes to html.json or if you want help.

thanks

BeastCode avatar Jan 02 '20 03:01 BeastCode

Thanks @BeastCode I add pull of request of this. But How test your extension before publish?

Toso82 avatar Jan 03 '20 11:01 Toso82