包含标签 angular 的文章

angular-matSort

angular中使用matSort对表格进行排序 https://material.angular.io/components/sort/overview <ng-container matColumnDef="start_at"> <th mat-header-cell *matHeaderCellDef mat-sort-header class="table-header"> start time </th> <td mat-cell *matCellDef="let appointment"> {{appointment.start_at|date:'yyyy-MM-dd HH:mm'}} </td> </ng-container> ''' matColumnDef="start_at"和appointment.start_at|date:'yyyy-MM-dd HH:mm'中的start_at这个变量名称要相同,不然会出现已经使用了mat-sort-header出现了箭头,点击确没有反应的情况 ……

阅读全文

angular相关

https://angular.io 安装 npm install -g @angular/cli 新建项目 ng new my-app https://angular.io/guide/entry-components The entryComponents array Though these two mechanisms account for most entry components, if your app happens to bootstrap or dynamically load a component by type imperatively, you must add it to entryComponents explicitly. 传递变量到dialog https://material.angular.io/components/dialog/overview ngClass用法 https://angular.io/api/common/NgClass 下拉列表默认值 https://stackblitz.com/edit/how-to-set-default-value-of-mat-select-when-options-are-retriev?file=app%2Ftable-basic-example.html……

阅读全文