I have multiple checkbox on my view page and I want to access those selected values on form submit. How Can I access it?. I have seen on SO, that we can access checkbox using change event, but it doesn't work for me. Below is my code.
Note : I am using model driven approach (Form Builder), I would like to see answer in model driven way, if possible.
<ion-row>
<ion-col col-sm-6 col-md-6 col-lg-3 col-xl-4 *ngFor="let location of company_data.data.locations; let i=index" [hidden]="location.location_id == location_id_Ref.value">
<ion-item>
<ion-label>{{location.location_name}}</ion-label>
<ion-checkbox value="{{location.location_id}}" (click)="updateCheckedOptions(location, $event)" formControlName="worksites"></ion-checkbox>
</ion-item>
</ion-col>
</ion-row>