I am having some challenges creating a radio button name Dynamically. How can I Dynamically generate a radio button name. Here is my html code
<table>
<td>
<input type="radio" #radio [id]="inputId" name="radio" />
<label [for]="inputId">
<ng-content></ng-content>
</label>
</td>
<br />
<br />
</table>
I am also passing a string to the Radio Buttton Component like this
<radio-button>
<b>Radio Button 1</b>
</radio-button>
<radio-button>
<b>Radio Button 2</b>
</radio-button>
<radio-button>
<b>Radio Button 3</b>
</radio-button>
<radio-button>
<b>Radio Button 4</b>
</radio-button>
My name
attribute is hard-coded to the component like name="radio"
. I want to generate a dynamically assigned names for the radio button