HTML
<ng-container matColumnDef="view">
<mat-header-cell *matHeaderCellDef mat-sort-header>View</mat-header-cell>
<mat-cell *matCellDef="let element; let i=index">
<mat-checkbox formControlName="view" (change)=updateCheckedList(element)>
</mat-checkbox>
</mat-cell>
</ng-container> ```
**TS**
view = [true,false,false,true]
createRoleForm(): FormGroup
{
return this._formBuilder.group({
id : [this.role.id],
name : [this.role.name],
// view :
});
}
I need to check the check boxes which are in the material table(view column) according to values of view list.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…