I have object that consists of fields, other objects and arrays and it looks like this
Now, in my html, I access data for aaType, adjust etc.
<div class="flexdirectioncolumn">
<div class="flex50">
<label class="label-prop-a"> Name </label>
<div>
<input #name type="text" value={{entity.name}} (keyup.enter)="changeName(name.value)" />
</div>
</div>
<div class="flex50">
<label> AaType </label>
<div>
<input #aaType type="text" value={{entity.aaType}} (keyup.enter)="changeAaType(aaType.value)" />
</div>
</div>
<div class="flex50">
<label> Adjust </label>
<div>
<input #adjustableInput type="checkbox" value={{entity?.adjust}} (keyup.enter)="changeAdjust(adjustInput.value)" />
</div>
</div>
<div class="flex50">
<label> System </label>
<div>
<input #systemInput type="text" value={{entity?.system}} />
</div>
</div>
<div class="flex50">
<label>{{entity.creat.rule}}</label>
<div *ngFor="let param of entity.creat.parameters">
<label>{{param}}</label>
<input type="text" value={{param.value}} />
</div>
</div>
</div>
I managed to show creationInfo.rule that you can see in my html.
Now there is 2 questions that is bothering me:
- For some reason, I can't access parameters array so I can use ngFor to create them all.
- How can I show my label and input in ngFor div in a way that label will generate parameters name (like "departure-angle") and value in input to show "13"?