I have to Create a list of checkboxes dynamically so i have used *ngFor to iterate the array of objects everything is working fine till iteration. the problem is occured whe
update
In Angular2 final [for]="xxx" should work fine. They added an alias from for to htmlFor.
original
Angular by default uses property binding but label doesn't have a property for. To tell Angular explicitly to use attribute binding, use instead:
[attr.for]="someField"
or
attr.for="{{someField}}"
instead.
These also work because htmlFor is the property for is reflected to.
[htmlFor]="someField"
htmlFor="{{someField}}"
In Angular2 RC.6 an alias was added so these should now work as well:
[for]="someField"
or
for="{{someField}}"