Answer the question
In order to leave comments, you need to log in
Pagination in Angular with NgRX?
Help implement client-side pagination. The state gets the entire list of objects, you need to display 5 objects on each of the pages. I attached the effect of the service below (I don’t know what to attach)
loadNews$ = createEffect(() => this.actions$.pipe(
ofType(newsActions.loadNews),
mergeMap( () => this.newsService.getNewsAll().pipe(
map(result => newsActions.loadNewsSuccess({ result })),
catchError(error => of(newsActions.loadNewsFailed({ error })))
))
));
getNewsAll(): Observable<NewsModel> {
return this.http.get<NewsModel>(this.newsAllUrl);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question