import { DataManager, WebApiAdaptor, DataResult, DataOptions, Query, CrudOptions } from '@syncfusion/ej2-data';
import { Ajax } from '@syncfusion/ej2-base';
class CustomAdaptor extends WebApiAdaptor {
public processResponse(data: DataResult, ds?: DataOptions,
query?: Query, xhr?: XMLHttpRequest, request?: Ajax, changes?: CrudOptions): Object {
let currentLogon = data["currentLogon"];
let allUser = data["allUser"];
return super.processResponse(data, ds, query, xhr, request, changes);
}
}
@Component({
selector: 'control-content',
templateUrl: 'remote-data.html'
})
export class DataBindingComponent implements OnInit {
.....
ngOnInit(): void {
this.data = new DataManager({ url: SERVICE_URI + 'api/Orders', adaptor: new CustomAdaptor });
}
}
|