vendredi 3 août 2018

Angular 4 add checkboxes to select list

I need to add checkboxes to existing select list in Angular 4

Here is my code for select list and it works fine:

<select formControlName=selectItems" name="selectItems" class="form-control" 
 id="selectItems" (change)="selectItem($event)" required>
 <option value="">- Select -</option>
 <option *ngFor="let item of items; let i = index"> </option>
</select>

I need to add a checkbox in front of every item in select list so user could do multiple selections. Tried few options but nothing worked so far.

What would be a good approach to resolve this task?




Aucun commentaire:

Enregistrer un commentaire