michaelbromley / ngx-pagination

Pagination for Angular
http://michaelbromley.github.io/ngx-pagination/
MIT License
1.21k stars 244 forks source link

PaginatePipe: Argument is missing the following required properties: currentPage #405

Open tom-laplace opened 7 months ago

tom-laplace commented 7 months ago

Angular version: 15.2.9

ngx-pagination version: 6.0.3

Description of issue:

When I try to use the paginate pipe with Observables and async pipe, I got a console error and no data.

Example :

 *ngFor="let activite of listeActivites$ | async | paginate: {
            itemsPerPage: 10,
            currentPage: p,
          }"

The error :

PaginatePipe: Argument is missing the following required properties: currentPage

Steps to reproduce: Use an async pipe before paginate pipe.

Expected result: To paginate the data correctly.

Actual result: Error in the console and no data to display.

michaelbromley commented 7 months ago

Hi,

Can you put together a stackblitz reproduction of this?