I am trying to use mat slide toggle compoment from Angular Material but, when I try to initialize the slider with a default value with the [checked] attribute, no matter what is in this field the slider is always checked.
<mat-slide-toggle color="primary" [checked]="false" formControlName="{{input.id}}"></mat-slide-toggle>
Any idea ?
Thanks in advance,
Nicolas
Initialize on the form during initialization or go for
patchValueinstead of usingchecked.ts
html
stackblitz