I have the next problem: construction
<p-dataTable [value]="listOfAddresses" [expandableRows]="true" [expandedRows]="listOfAddresses" ">
<p-column>
<ng-template let-item="rowData" let-i="rowIndex" pTemplate="body">
{{i+1}}
</ng-template>
</p-column>
<p-column >
<ng-template ngFor let-item [ngForOf]="listOfOriginalAddresses" pTemplate="body">
{{item.Street + " " + item.City}}
</ng-template>
</p-column>
</p-table>
Returns undefined values for item.Street and item.City Strange because if I use
<p-column >
<ng-template pTemplate="body">
<div *ngFor="let item of listOfOriginalAddresses">
{{item.Street + " " + item.City}}
</div>
</ng-template>
</p-column>
I have all required values but all the list in the row. What is the problem? Thanks in advance
Solved but not with using of ngFor.
I create pipe:
transform(value: any): any {
let item = value;
return (item.Street + " " + item.Country);
}
Furthermore, data don't change according to the edition in the fields with parced address, what solved another headacke.