mardi 3 juillet 2018

angular add label to checkboxes created with *ngFor

I am using angular 5

I am using the following code to create multiple checkboxes, and need to give them labels

<input type="checkbox" *ngFor = "let v of options[0].options" [value]="1" [name] = "1">

When using HTML I would use

How can I use label within the *ngFor and create the suitable labels?

Thanks




Aucun commentaire:

Enregistrer un commentaire