Closed chhinsras closed 4 years ago
You are trying to access callClients.name
, but the Call interface doesn't have callClients
property. Is it a typo?
You are trying to access
callClients.name
, but the Call interface doesn't havecallClients
property. Is it a typo?
it is not typo.
it is 'callReasons.name'
is it possible to access the array
// this is my actual response from server.
[
{
"id": 17,
"acceptCall": true,
"callClients": [
{
"id": 12,
"name": "Mean thormi",
},
{
"id": 10,
"name": "Borarey",
}
],
"callReasons": [
{
"id": 46,
"name": "Support Transportation"
},
{
"id": 22,
"name": "Buy Food"
}
]
},
{
"id": 16,
"acceptCall": true,
"callClients": [
{
"id": 12,
"name": "Mean thormi",
},
{
"id": 10,
"name": "Borarey",
}
],
"callReasons": [
{
"id": 46,
"name": "Support Transportation"
},
{
"id": 22,
"name": "Buy Food"
}
]
}
]
This is what I am thinking of //
{ key: 'callClients.map(c => c.nameKH)', title: 'Clients', width: '7%'}
But not working
You need to build your own column template, since it is an array, not an object.
I still cannot figure it out.
Could you show me how to use this template?
I followed you and it showed object
I need to manual type the template copied from this repo to work.
<ng-template #clientTbl let-row let-rowIndex="rowIndex"> <div *ngFor="let item of row.callClients">
I have
// This is column configuration