I have a multiple checkbox list in my page.
<label class="each-topic each-hcp" for="hcp{{hcpinfo.id}}{{hcpinfo.firstName}}" *ngFor="let hcpinfo of hcplist; let i=index">
<input type="checkbox" name="hcpid" id="hcp{{hcpinfo.id}}{{hcpinfo.firstName}}" value="{{hcpinfo.id}}">
<h4>{{hcpinfo.firstName}}</h4>
</label>
In my .ts file I have a predefined array as this.hcparr.
This contains values like [5,8,10] - as array.
If hcparr has hcpinfo.id value then the corresponding checkbox needs to be selected.
How do you implement the if condition with multiple check box with this array list?
Please help me.