Pagination in Angular with NgRX?

Help implement client-side pagination. In state gets the entire list of objects, you need to bring in 5 objects on each page. Below made effective for the service(don't know what you need to make)
loadNews$ = createEffect(() => this.actions$.pipe(
ofType(newsActions.loadNews),
 mergeMap( () => this.newsService.getNewsAll().pipe(
 map(result => newsActions.loadNewsSuccess({ result })),
 catchError(error => of(newsActions.loadNewsFailed({ error })))
))
 ));


And services:
getNewsAll(): Observable<NewsModel> {
 return this.http.get<NewsModel>(this.newsAllUrl);
 }
April 4th 20 at 13:07
0 answer

Find more questions by tags AngularTypeScript