Skip to content

Instantly share code, notes, and snippets.

@henryruhs
Last active April 20, 2022 11:44
Show Gist options
  • Save henryruhs/f1ba4a56ece1b79358888c47314a921f to your computer and use it in GitHub Desktop.
Save henryruhs/f1ba4a56ece1b79358888c47314a921f to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { CrudService } from 'ngx-crud';
import { RequestBody, ResponseBody } from './example.interface';
import { environment } from '@env';
@Injectable()
export class ExampleService extends CrudService<RequestBody, ResponseBody>
{
protected apiUrl : string = environment.apiUrl;
protected endpoint : string = environment.routes.example;
findByIdArray(idArray : string[]) : Observable<ResponseBody[]>
{
return this.setParamArray('id', idArray).find();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment