Created
May 7, 2018 12:28
-
-
Save jlaine/8006e86dd4c60b054bcdd2b6e7dda2e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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