I am trying to get the values from radio buttons in angular but I am getting numbers instead.
here is the code:
<div class="form-group col-12">
<p>Gated Community</p>
<div class="btn-group" btnRadioGroup formControlName="Gated">
<label class="btn btn-outline-primary mr-2"
btnRadio=1 tabindex="0" role="button" name="Gated">Yes</label>
<label class="btn btn-outline-primary"
btnRadio=2 tabindex="0" role="button" name="Gated">No</label>
</div>
</div>
in the ts file I have:
this.property.Gated = this.Gated.value;
I tried to add value to the html but it is not working!
<label class="btn btn-outline-primary mr-2" btnRadio=1 tabindex="0" role="button" name="Gated" value="Y">Yes</label>
but still I am getting values of 1 or 2 not "y" or "n"