Ion-toggle checked attribute

Hi All,

How do you switch off the toggle switch? Looking at the Ionic documentation, it suggests to use a checked attribute. However, I have tried this as well as ng-checked with no success.

Any suggestions please?

  <ion-label>Drivers Licence</ion-label>
  <ion-toggle checked="false" id="driversLicence" formControlName="driversLicence">Drivers Licence</ion-toggle>

It seems like if I have the formControlName="driversLicence", the toggle switch is always on. Why is that? How can I get this to work because I need the formControlName?

I need to access the driversLicence, which I do as follows:



How can I get the driversLicence value without using a formControlName when the form submits? I try the following, but it is null.


solved using [(ngModel)]