Skip to content

Instantly share code, notes, and snippets.

@jlaine
Created May 7, 2018 12:28
Show Gist options
  • Save jlaine/8006e86dd4c60b054bcdd2b6e7dda2e6 to your computer and use it in GitHub Desktop.
Save jlaine/8006e86dd4c60b054bcdd2b6e7dda2e6 to your computer and use it in GitHub Desktop.
export class Pony {
id: number;
is_available: boolean;
name: string;
}
@Injectable()
export class PonyService {
baseUrl = 'http://localhost:8000/v1/ponies';
constructor(
private http: HttpClient
) { }
list(urlOrFilter?: string | object): Observable<Page<Pony>> {
return queryPaginated<Pony>(this.http, this.baseUrl, urlOrFilter);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment