Checkbox angular material checked by default
问题 I am trying to use an Angular Material checkbox, and set it by default as checked, but it is displayed as non-checked, what is wrong? <mat-checkbox class = "example-margin" [(ngModel)] = obj.impresora> <label>Printer</label> </mat-checkbox> obj.impresora property is boolean 回答1: You can either set with ngModel either with [checked] attribute. ngModel binded property should be set to 'true': 1. <mat-checkbox class = "example-margin" [(ngModel)] = "myModel"> <label>Printer </label> </mat