As far as i understand in an older version of angular you could do this:
<input type="checkbox" ng-true-value="test"/>
Which would then allow me to pull the value of the selected checkboxes instead of just true or false. I don't seem to be able to do this in Angular 8.
The scenario needs it this way, true or false isn't good enough because i have something like this:
<tr formArrayName="marketingPreferences" *ngFor="let marketingPreference of clientForm.controls.marketingPreferences.controls; let i = index">
<td>
{{ marketingOptions[i].name }}
</td>
<td>
<input type="checkbox" [formControlName]="i" value="marketing"/>
</td>
<td>
<input type="checkbox" [formControlName]="i" value="referral"/>
</td>
</tr>
So when i pull the data on form submit to transform it, all i get back is true or false instead of "marketing" or "referral"
Essentially i need 2 checkboxes as though they were in an array...
In fact, i'm not even sure this will work, angular doesn't exactly make checkbox arrays easy. In HTML you'd simply make the field name="something[]" but this doesn't seem to work.