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?
There are several ways you can achieve this based on the approach you take. For reactive approach, you can pass the default value to the constructor of the FormControl(import from @angular/forms)
this.randomForm = new FormGroup({
'amateur': new FormControl(false),
});
Instead of true or false value, yes you can send variable name as well like FormControl(this.booleanVariable)
In template driven approach you can use 1 way binding [ngModel]="this.booleanVariable"
or 2 way binding [(ngModel)]="this.booleanVariable"
like this
{{col.title}}
You can also use the checked directive provided by angular material and bind in similar manner