I am currently using beta.17 within this web application i am building, as it had issues when trying to upgrade. But anyway thats not the issue.
I have a Model form, and I am trying to use Radio Buttons, and I know there was always issues with it until the fix on rc2.
But here is my section of the form using them:
<div *ngFor="let ctrl of markingForm.controls['design'].controls; let i = index;" [ngFormModel]="ctrl">
<accordion-group [heading]="ctrl.value.name" >
<div *ngFor="let design of studentAssign.assID[0].template[0].design; let j = index">
<label class="form-check-inline" *ngFor="let comment of design.comments">
<input name="input" class="form-check-input" type="radio" value="test" ngControl="comment">{{comment.short}}
</label>
</div>
</accordion-group>
</div>
I am trying to bind the value to 'comment' within this part of the ControlArray:
"design": [
{
"name": "Rubric Section Name",
"comment": null,
"mark": null,
"maxMark": 50
},
{
"name": "ttt",
"comment": null,
"mark": null,
"maxMark": 20
}
]
(the 'design' part is populated before hand and could be X amount big).
So realistically it should work right?
But i get this error:
ORIGINAL EXCEPTION: TypeError: Cannot read property 'value' of null
ORIGINAL STACKTRACE:
TypeError: Cannot read property 'value' of null
at RadioControlValueAccessor.onChange
Is there any way around this? Or is there a fix or do I need to upgrade to rc2? Or can the radio buttons be easily replicated with checkboxes?