Custom Adapters
Introduction
Steps to Create a Custom Adapter
1. Implement the IResponseAdapter Interface
IResponseAdapter Interfaceclass MyCustomAdapter implements IResponseAdapter {
toClient(data: any): any {
// Transform data to client format
return data;
}
fromRemote(data: any): any {
// Transform data received from remote API
return data;
}
fromRemoteList(data: any): any {
// Transform list data received from remote API
return data;
}
}2. Use the Custom Adapter
Global Scope
Per Instance Scope
Last updated