I’m iterating over an array with for… of. The array contains the true/falses from a checkbox array.
I’m finding that the array is empty until the checkbox is ticked. They are initialised like this:
<ion-checkbox color="primary" checked="false" *ngIf="listitem.flavour === 'item'" [(ngModel)]="item_ticks[i]" (ionChange)="updateTicks()"></ion-checkbox>
As you can see, checked is already set to “false” so why is the ngModel item_ticks empty (null) until the checkboxes are checked?