1 possible answer(s) on “Pagination. Call pageChange to many times on Init

  1. My guess is what is happening is that totalItems is not set initially, so inside the pagination, this.collectionSize is not a number, which transforms this._pageCount into NaN when ngOnChanges first runs. A simple workaround is to give it an initial value of 0, as in this Plunker.

    Given that, I don’t think this is an issue with the library, unless we want to guard against this situation and default to 0 if Math.ceil results in NaN, which may not be the worst thing in the world.