G
G
Ghoulll2020-01-21 10:34:25
SQL
Ghoulll, 2020-01-21 10:34:25

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 })))
    ))
  ));

And service:
getNewsAll(): Observable<NewsModel> {
    return this.http.get<NewsModel>(this.newsAllUrl);
  }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2019-04-14
@Rsa97

join P urchase_item pi
JOIN p urchase_item pi

I
irishmann, 2019-04-14
@irishmann

purchase.id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question