https://stackblitz.com/edit/angular-material-wuzktn?file=app%2Fapp.component.css
<mat-checkbox (click)="$event ? masterSelect() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()" #check>
Master select
</mat-checkbox>
{{selection.hasValue() && isAllSelected()}}
{{check.checked}}
<mat-checkbox *ngFor="let row of data" (change)="$event ? selection.toggle(row) : null"
[checked]="selection.isSelected(row)">
{{selection.isSelected(row)}}
</mat-checkbox>
When i click on "Master checkbox" i want to select all checkboxes below and it works but "Master checkbox" does not change value. When i inspect it mat-checkbox checked
property is false. Also mat-checkbox-checked class is absent.