I am using angular 7 with primeng
In one of my primeng table, I am getting one of column of table as array
permissions: ["api-search-miscellaneous", "api-show-miscellaneous", "api-updatestatus-miscellaneous",…]
0: "api-search-miscellaneous"
1: "api-show-miscellaneous"
2: "api-updatestatus-miscellaneous"
3: "api-delete-miscellaneous"
4: "api-add-miscellaneous"
5: "api-showall-miscellaneous"
6: "api-update-miscellaneous"
Now primeng showing that column with comma separated , How can i show that array elements one after other in different line in one row only .
These are my columns , here permission is in form of array , which I am showing as group on my web page .ts file code
this.cols = [
{
field: 'name',
header: this.getLocalTranslation(
'Features.gridLabel.featureGroup',
),
},
{
field: 'permissions',
header: this.getLocalTranslation(
'Features.gridLabel.functionalities',
),
},
];
.html file code
<ng-template pTemplate="body" let-rowData let-columns="columns">
<tr [pSelectableRow]="rowData">
<td *ngFor="let col of columns">
{{ rowData[col.field] }}
</td>
</tr>
</ng-template>