I'm calling an API endpoint that uses pagination in the header. I want to make use of that, so I need to take two steps:
- I need to parse the HTTP
Linkheader. - I should implement pagination in Angular 4.
So currently, I have this service built:
getBooks() {
return this.http
.get(`${BaseService.baseUrl}/books`)
.map(response => <Book[]> response.json());
}
Now I need to parse the headers from the response, but I'm not sure how to? I'm also not sure how I should build the pagination in my component.
Who could set me up with some help, please?