I am using angular 4. I have two checkboxes in a Group and I want to make sure only one of them can be checked and I can be diselect both. So if one is checked the other has to be unchecked. I have written below code. I want to select only once at time from these checkboxes.
<div class="btn-group-toggle w-100 Filtertogglebtns d-block d-md-none" data-toggle="buttons">
<label class="btn btn-light mr-2">
<input type="checkbox" name="filteroptions" id="option1" autocomplete="off"> <i class="fa fa-long-arrow-up"></i>
</label>
<label class="mt-md-0 btn btn-light">
<input type="checkbox" name="filteroptions" id="option2" autocomplete="off"> <i class="fa fa-long-arrow-down"></i>
</label>
</div>
I want like this reference link but using angular 4. Please help me with this.
Aucun commentaire:
Enregistrer un commentaire