[
{
"name": "jkjk",
"firstName": "hgh",
"lastName": "ehtrh",
"replytype": "svdv",
"prodCode": "svv",
"executor": "ewwe",
"skills": [
{},
{}
]
},
{
"name": "sdkjbdsf",
"firstName": "kdvbfd",
"lastName": "dkbd",
"replytype": "SQLServer",
"prodCode": "vsdv",
"executor": "vkjbndsf,vd",
"skills": [
{
"name1": "abs"
},
{
"name2": "bbs"
}
]
}
]
In this case I recommend you to use a *ngFor
loop and generate your inputs.
Add keys as the name
property and the values as value.
Then you can post the data as the usual way back.
<form>
<div *ngFor="let item of array">
<ng-container *ngFor="let i of item | keyvalue">
<input [name]=i.key [value]="i.value" />
</ng-container>
</div>
<button type="submit" (click)="edit()"></button>
</form>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.