1
的動態數組我有對象像數組:PrimeNg數據表:綁定對象
"rows": [
{
"id": 1,
"createdAt": "2017-07-21T06:05:38.000Z",
"updatedAt": "2017-07-21T06:05:38.000Z",
"createdBy": null,
"modifiedBy": null,
"name": "ABC",
"owner": "Dian",
"age": 23,
"industry": "abc"
},
{
"id": 2,
"createdAt": "2017-07-21T06:05:38.000Z",
"updatedAt": "2017-07-21T06:05:38.000Z",
"createdBy": null,
"modifiedBy": null,
"name": "ABsC",
"owner": "Disdan",
"age": 23,
"industry": "absdc"
}
]
我想這將綁定到我的primeng數據表。通過這個documentation走出去,在確定時代需要像數據,
[
{field: 'vin', header: 'Vin'},
{field: 'year', header: 'Year'},
{field: 'brand', header: 'Brand'},
{field: 'color', header: 'Color'}
];
在我的情況下,這個數據可以是動態的含義顯示名可能會代替名。我如何將這些數據綁定到我的數據表中。提前致謝!