Checkbox is not unchecked by default

 <form [formGroup] = "myForm">
              <ion-checkbox formControlName = "language"  [checked]="unchecked"></ion-checkbox>
          <button ion-button block tappable  >Submit</button>

export class TestdataPage {
language : boolean;
  myForm : FormGroup;
  constructor(public navCtrl: NavController, public navParams: NavParams, private fb:FormBuilder) {

    this.myForm ={
      language : [Validators.nullValidator]

  ionViewDidLoad() {
    console.log('ionViewDidLoad TestdataPage');


> when i execute above code the check box is coming as checked by default. i don't know why?

Do not bind the checked property if you are using reactive forms. Simply set the value of the bound FormControl.

Actually it’s worked when i made simple change.
i modify
language : [false]
Thanks for the support

1 Like