I have a batch of checkboxes that correspond to the profiles I intend to store in the database.
HTML:
<tr *ngFor="let profile of profiles | async">
<input type='checkbox' name="profiles" value='{{profile.id}}' ng-model='profile.checked'> {{profile.name}}
<td>
{{profile.id}}
</td>
Next, in the TypeScript file, I aim to loop through the list of profiles and invoke the create profile service for those that are checked. The service expects a single profile, so I need to iterate through and verify if the checkbox is selected before calling the Spring Boot service.
Any suggestions on how to achieve this?
TYPESCRIPT.TS
//Your code recommendations here
//Calling the service
this.profileService.createProfile(profile)