3
錯誤類型錯誤:數據表的問題 - 錯誤類型錯誤:val.slice不是一個函數
val.slice is not a function
dataTable的配置
$.p-dataTable #dt [value]="customers" [(selection)]="chkBoxSelect"
dataKey="customerId" [rows]="10" [paginator]="true"
paginatorPosition="both" [pageLinks]="5" [rowsPerPageOptions]="[5,10,20]"
[globalFilter]="gb" [headerCheckboxToggleAllPages]="false"
[editable]="true" exportFilename="customers" [lazy]="true"
[totalRecords]="totalRecords" onLazyLoad)="loadCustomersByPage($event)"
回調函數
$loadCustomersByPage(event: LazyLoadEvent) {
const parameters = "?page=" + event.first + "&size=" + (event.first + event.rows);
this._cs.findAllActiveCustomerDetailsByPage(parameters).subscribe(
(data: any) => {
this.customers = data;
},
(error) => {
console.log("--error--" + error)
}
);
}
我的問題解決了。這是我的錯誤。數據不是適當的對象 – Hari
你能否提供適當的對象類型? – DenisK