You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will result in the above returning `CustomPaginationMeta` in the `meta` property instead of the default `IPaginationMeta`.
351
354
352
-
353
355
## Custom links query params labels
354
356
355
357
If you want to alter the `limit` and/or `page` labels in meta links, then use `routingLabels` in the options like so
356
358
357
359
```ts
358
-
359
-
returnpaginate<MyEntity>(this.repository, {
360
+
returnpaginate<MyEntity>(this.repository, {
360
361
page,
361
362
limit,
362
363
routingLabels: {
363
364
limitLabel: 'page-size', // default: limit
364
365
pageLabel: 'current-page', //default: page
365
-
}
366
-
});
366
+
},
367
+
});
367
368
```
368
369
369
370
This will result links like `http://example.com/something?current-page=1&page-size=3`.
371
+
372
+
## Custom re-routing latest page have items
373
+
374
+
If you just want to return latest has items when the parameter `page` was over than `page` calculated in the database at the moment, then use `routingLatest` as the options. Make sure you not set countQueries to `false`. It will be ignored when pagination is disabled and `routingLatest` option won't be affect anymore.
0 commit comments