I have created a html template that is reused a couple times in a parent component but with different data passed on.
I have parent.component.html which has
<child-component title="one"></child-component>
<child-component title="two"></child-component>
<child-component title="three"></child-component>
Which works just fine.
The thing is, in 'child-component' I have checkboxes and their corresponding labels. As you know, they need the for attribute to know when a checkbox is checked. As I have realized, Angular re-renders the child-component each time is called, like a clone, and the for attributes are all the same for each child-component, so checkboxes don't work. I want to be able to create dynamic for and id for each checkbox each time the child-component is called upon.
I tried to explain my problem as best as I could. Is such solution possible?