I'm exploring how to utilize a Radio button as a toggle in Angular2.
My goal is to capture the value of the Radio button when it changes without the need for creating a form.
Any assistance would be greatly appreciated.
[edit]:
This is what I tried:
<div class="form-group">
<label for="gender">Gender</label><br>
<input type="radio" name="gender" value="male" checked> Male
<input type="radio" name="gender" value="female"> Female<br>
</div>
I added this code within a form and was able to retrieve the gender value through form details. However, I want to achieve this without using a form.