Skip to content

Commit 0c96a8a

Browse files
committed
Merge branch 'techraiders-master'
1 parent 144a91c commit 0c96a8a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Start typing `a-md-*` and hit `enter`, the snippet spreads out.
4242
| a-md-checkbox-fc | `<mat-checkbox>` control with `formControlName` |
4343
| a-md-chips | `<mat-chip-list>` control with `<mat-chip>` |
4444
| a-md-chip | `<mat-chip>` control for `<mat-chip-list>` |
45+
| a-md-data-table | `<mat-table>` control |
4546
| a-md-datepicker | `<mat-datepicker>` control |
4647
| a-md-divider | `<mat-divider>` control |
4748
| a-md-inset-divider | `<mat-divider>` control configured `inset` |

snippets/html.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,5 +514,35 @@
514514
"prefix": "a-md-chip",
515515
"body": ["<mat-chip>${1:val}</mat-chip>"],
516516
"description": "<mat-chip> control for <mat-chip-list>"
517+
},
518+
"DataTable": {
519+
"prefix": "a-md-data-table",
520+
"body": [
521+
"<mat-table [dataSource]=\"${1:dataSource}\">",
522+
"\t<ng-container matColumnDef=\"${2:columnName}\">",
523+
"\t\t<mat-header-cell *matHeaderCellDef> ${3:columnHeaderLabel}",
524+
"\t\t</mat-header-cell>",
525+
"\t\t<mat-cell *matCellDef=\"let element\"> {{element.${4:propertyName}}} </mat-cell>",
526+
"\t</ng-container>\n",
527+
"\t${5:a-md-data-table-column}",
528+
"\t<!-- press ctrl + space to add more column snippet or delete this line -->\n",
529+
"\t<mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>",
530+
"\t<mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>",
531+
"</mat-table>"
532+
],
533+
"description": "<mat-table> control"
534+
},
535+
536+
"MatTableColumn": {
537+
"prefix": "a-md-data-table-column",
538+
"body": [
539+
"<ng-container matColumnDef=\"${1:columnName}\">",
540+
"\t<mat-header-cell *matHeaderCellDef> ${2:columnHeaderLabel}</mat-header-cell>",
541+
"\t<mat-cell *matCellDef=\"let element\"> {{element.${3:propertyName}}} </mat-cell>",
542+
"</ng-container>\n",
543+
"${4:a-md-data-table-column}",
544+
"\t<!-- press ctrl + space to add more column snippet or delete this line -->\n",
545+
],
546+
"description": "<mat-header-cell> column for </mat-table> control "
517547
}
518548
}

0 commit comments

Comments
 (0)