Ionic Checkbox

I have created a checkbox in my project. When the app is loaded the initial value of the checkbox is checked. How to make its initial value as unchecked.

kindly show me your code

try this

<ion-checkbox slot="end" ></ion-checkbox>
<ion-checkbox slot="end" checked="true"></ion-checkbox>
<ion-checkbox slot="end" checked="false"></ion-checkbox>

I have tried using checked=“false”,

show me your checkbox html code


    <ion-checkbox slot="end" checked="false" ngModel name="checking"></ion-checkbox> I hereby declare that, I agree to make payment of my admission.</p>
      <ion-button [disabled]= "!f.value.checking" color="secondary" type="submit" >
        Make Payment


Assign to the backing model property or FormControl in the controller. You virtually never want anything to do with the checked attribute.

remove ngModel attribute in your checkbox

<ion-checkbox slot="end" checked="false"  name="checking"></ion-checkbox>

if this ngModel attribute is mandatory try this example

<ion-checkbox slot="end" checked="false" [(ngModel)]="checking" name="checking"></ion-checkbox>


 checking = false;

It works. But why there is a bug with ngModel?