mercredi 26 juillet 2017

Angular 2 Mutually exclusive checkboxs

I have 2 checkboxes, when one is checked the other have to be unchecked, is there any way, using ngModel to block the selection of the other when one of them is already selected ?

                    <input type="checkbox" class="filled-in" id="checkIn" [(ngModel)]="checkboxFlag" checked />
                    <label id="labelIn" for="checkIn"> Inbound</label>
                    <input type="checkbox" class="filled-in" id="checkOut"  />
                    <label id="labelOut" for="checkOut"> Outbound</label>




Aucun commentaire:

Enregistrer un commentaire