Skip to content

Instantly share code, notes, and snippets.

@sainture
Last active September 30, 2020 07:06
Show Gist options
  • Select an option

  • Save sainture/76ea1834c8c488b43d9a078f60a594f6 to your computer and use it in GitHub Desktop.

Select an option

Save sainture/76ea1834c8c488b43d9a078f60a594f6 to your computer and use it in GitHub Desktop.
export class ApiResponseModel<T> {
statusCode = '';
userFriendlyMessage = '';
object: T | undefined;
}
protected get<T>(endpoint: string, params: any): Observable<ApiResponseModel<T>> {
return this.backendService.get(endpoint, {
...params
});
}
}
// call
this.get<Group[]>(this.endpoint(true))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment