src/app/inflight/get-page-func.ts
Function template to fetch data
The function will receive pageNumber and perPage.
It needs to return an Observable that will yield PagedResults.
This will typically be Angular HTTP get call, followed by map.
To add timeout and retry, use standard RxJS techniques at this stage.
Properties |
Signature :
[page: number, perPage: number]
|
|||
Returns : Observable<PagedResults>
|
|||
|
Parameters :
|
|||
|
The function will receive |
import {Observable} from 'rxjs';
import {PagedResults} from '../interfaces/paged-results';
/**
* Function template to fetch data
*
* The function will receive `pageNumber` and `perPage`.
* It needs to return an `Observable` that will yield {@link PagedResults}.
* This will typically be Angular HTTP `get` call, followed by `map`.
* To add timeout and retry, use standard RxJS techniques at this stage.
*/
export interface GetPageFunc {
/**
* The function will receive `pageNumber` and `perPage`.
* It needs to return an `Observable` that will yield {@link PagedResults}.
* This will typically be Angular HTTP `get` call, followed by `map`.
* To add timeout and retry, use standard RxJS techniques at this stage.
*
* @param {number} page
* @param {number} perPage
* @returns {Observable<PagedResults>}
*/
(page: number, perPage: number): Observable<PagedResults>;
}