Hi Sander,
i tried this, but it won't work for me:
const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice', gender : 'm' },
{ id: 12, name: 'Narco', gender : 'f' },
{ id: 13, name: 'Bombasto', gender : 'm' },
{ id: 14, name: 'Celeritas', gender : 'f' },
{ id: 15, name: 'Magneta', gender : 'm' },
{ id: 16, name: 'RubberMan', gender : 'm' },
{ id: 17, name: 'Dynama', gender : 'f' },
{ id: 18, name: 'Dr IQ', gender : 'm' },
{ id: 19, name: 'Magma', gender : 'r' },
{ id: 20, name: 'Tornado', gender : 'r' }
];
<input type="radio" [(ngModel)]="sex" name="sex" value="m">Male<br>
<input type="radio" [(ngModel)]="sex" name="sex" value="f">Female<br>
<input type="checkbox" [(ngModel)]="sex" name="sex" [value]='null' >Don't
care<br>
<input type="checkbox" [(ngModel)]="sex" name="sex" value="r">Robots<br>
Now the radio button *Male*, the checkboxes *Don't care* and *Robots* are
checked, i get this list:
- 11 - Mr. Nice - m
- 13 - Bombasto - m
- 15 - Magneta - m
- 16 - RubberMan - m
- 18 - Dr IQ - m
I can't check only 1 checkbox, always 2 or 3 are checked.
Rgds
Stefan
Am Montag, 16. Oktober 2017 07:46:19 UTC+2 schrieb Sander Elias:
>
> Hi Stefan,
>
> Just at it to the radio-buttons and it will work. it has 3 options now,
> but you can as many as you please.
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.