I am working on an Angular5 project with PHP as backend. I am stuck at this level. The following is my code:
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 10,
order: [0, 'desc'],
serverSide: true,
processing: true,
ajax: (dataTablesParameters: any, callback) => {
that.http
.post<DataTablesResponse>(
'http://localhost/api/webapi/',
dataTablesParameters,{ headers: new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': 'token'
})}
).subscribe(resp => {
that.records = resp.data;
callback({
recordsTotal: resp.recordsTotal,
recordsFiltered: resp.recordsFiltered,
data: []
});
});
},
columns: [{ data: 'id' }, { data: 'name' }]
};
As I observed in this code I am sending the default parameters of data tables "dataTablesParameters". How can I add my custom parameter like (entryid) alongwith "dataTablesParameters"?
Please guide.