I'm attempting convert an Angular 1 app to Angular 2. Looping through a jagged array of booleans (boolean[][])
. I'm rendering out checkboxes
with the following code:
<div *ngFor="#cell of CellData; #parentIndex = index">
<input *ngFor="#col of cell; #childIndex = index" type="checkbox" [(ngModel)]="CellData[parentIndex][childIndex]" />
</div>
The checkboxes display correctly, however, if I select a checkbox the one to the right of it is also selected.
This logic works fine in the Angular 1 app so I'm not sure if it's a problem with the way I am using ngModel or an issue with Angular 2.
Any help would be much appreciated