Reputation: 99
`component :-
*ngFor="let ind of industryService.industries" value="{{ind.field[1].fieldName}}"`
How access fieldName in this collection object here
Upvotes: 0
Views: 35
Reputation: 2761
In order to do that, you will need to go deeper throught your object :
[value]="ind.field[0].field_id.fieldName"
And if you want to ngFor of field
:
<div *ngFor="let ind of industryService.industries; let i = index" [value]="ind.field[index].field_id.fieldName">
<div *ngFor="let fieldItem of ind.field>
<p>{{ fieldItem.fieldName }}</p>
</div>
</div>
Upvotes: 1