If you next radios inside different groups with different parents given that angular2-mdl is using checkboxes all groups sub radios are linked. This can cause odd and unintended side-effects with models that rely on nesting such as arrays of objects.
Steps to reproduce
- Create a form with with two formgroups like
<form [formGroup]="form">
<div formGroupName="group1">
<mdl-radio formControlName="type" value="type1">
<mdl-radio formControlName="type" value="type2">
</div>
<div formGroupName="group2">
<mdl-radio formControlName="type" value="type1">
<mdl-radio formControlName="type" value="type2">
</div>
</form>
- Create the corresponding form model
...
new FormGroup({
group1: new FormGroup({
type: new FormControl('')
}),
group2: new FormGroup({
type: new FormControl('')
})
});
...
This should result in a model of
{
group1: {type: 'type1'}
group2: {type: 'type2'}
}
however the boxes are being tied to each other. Not sure how to fix this one yet, however I'll think on it.
If you next radios inside different groups with different parents given that angular2-mdl is using checkboxes all groups sub radios are linked. This can cause odd and unintended side-effects with models that rely on nesting such as arrays of objects.
Steps to reproduce
This should result in a model of
however the boxes are being tied to each other. Not sure how to fix this one yet, however I'll think on it.