- Include license data in published package.json. Fixes (#400)
- Loosen peer dependencies to allow Angular versions > 13. Fixes (#390)
- Fix publishing of readme on npm
- Update to new Ivy package format for Angular v13+.
- Improve accessibility (#386)
- Fix keyboard control on default pagination controls (#370)
- Show "1" as the default page number rather than empty when there are 0 items in collection (#374)
- Remove the "navigation" role from the default controls template as it is invalid markup (#375), fixes #372
- A new event
pageBoundsCorrection
has been added to both thePaginationControlsDirective
and thePaginationControlsComponent
. This is emitted when thecurrentPage
value is found to be out-of-bounds (too high or too low). This change fixes #155 and is intended to allow finer control over how page changes are handled by your application, which is especially important when dealing with server-side pagination in reducing network calls.
- The
pageChange
event will no longer emit when thecurrentPage
value is found to be out-of-bounds. Instead, the newpageBoundsCorrection
event will emit. To get the same behavior as the prior versions, make the following change:
<!-- before -->
<pagination-controls (pageChange)="pageChanged($event)"></pagination-controls>
<!-- after -->
<pagination-controls (pageChange)="pageChanged($event)"
(pageBoundsCorrection)="pageChanged($event)"></pagination-controls>
- Formats page numbers with locale-aware separators (#307)
- Correct the peerDependencies field for Angular > 5.0.0 (#306)
- Lib is now built with Angular 8. This means it uses the version 4 metadata format and will no longer work with Angular v4 or less.
- Revert Angular version to v4 so as still use v3 metadata (#305)
- Propagate type of collection in PaginatePipe (#303)
- Improve type safety of PaginatePipe args
- Lib now built with Angular v8
- Allow a pagination id of
0
(#277)
- Add
ellipsis
class to ellipsis link in default controls (#263) - Add
getTotalItems()
method to PaginationControlsDirective (#258) - Add
responsive
input to PaginationControlsComponent (#256)
- Allow paginate pipe to work with ReadonlyArrays (#248)
- Default pagination controls component is now accessible via keyboard controls (#233)
- Revert breaking change to Angular AoT metadata version (#210)
- Cast numeric inputs to numbers (#190)
-
Project has been renamed from "ng2-pagination" to "ngx-pagination", since Angular is already way past version 2. Here are the changes you need to make:
- Update your package.json:
- "ng2-pagination": "^2.0.1", + "ngx-pagination": "^3.0.0",
- Rename the NgModule in your app module (and any other places you directly
import from 'ng2-pagination'
in your app):
- import {Ng2PaginationModule} from 'ng2-pagination'; + import {NgxPaginationModule} from 'ngx-pagination';
- Rename any styles which override the default component.
- .my-pagination .ng2-pagination .current { - background: red; - } + .my-pagination .ngx-pagination .current { + background: red; + }
-
The distribution format has changed from commonjs & system.register to ES modules & UMD. The primary module format being used is now "flat ES modules" (FESM), which means there is a single .js file which uses ES2015
import
s andexport
s rather than commonjsrequire
andmodule.exports
. Tested with Webpack 2, Rollup & System.js.
- Fix exception when config object uses accessors for itemsPerPage and currentPage (#128)
- In-memory paging works even when
totalItems
is specified, fixes #115 - Warn when using an
id
which does not match any registered with a PaginatePipe, fixes #116
- The module is being built with Angular 2.4.3. Therefore the metadata output is not compatible with Angular < 2.3.0. Attempting to use this version in an app running Angular < 2.3.0 will result in a "ctorParameters.map is not a function" error. See this StackOverflow answer for further information.
PaginationControlsComponent
no longer uses view encapsulation, making it very easy to style without the need for the/deep/
operator.
- Add inputs to
PaginationControlsComponent
to allow custom labels for "Previous", "Next" and screen reader labels.
- Fix missing export of PaginationControlsDirective
- Fix errors when using TypeScript < 2.0 (#81)
- Fix change detection errors when controls are declared before the pipe in the DOM (#91).
- Create the PaginationControlsDirective, which is the basis for all controls components, including the default component and any custom components.
- Custom templates are now implemented with the new PaginationControlsDirective, rather than by putting elements inside the PaginationControlsComponent.
- Naming of files and classes has been brought into line with the official style guide recommendations
This should not have a big impact if you are just consuming the NgModule, but the main change is that
PaginationControlsCmp
is nowPaginationControlsComponent
, and theIPaginationInstance
is now justPaginationInstance
.
- Fix flash of default template when creating component with custom template (#82)
- Fix type def issue which was breaking AoT builds (#80)
- (demo) Use AoT compilation for demo app
- (build) Upgrade to Webpack 2, TypeScript 2
- (build) Use mocha reporter for better unit test output.
- Update codebase to Angular 2.0.2
- Use the ngc compiler and include *.metadata.json files in dist package.
- Fix missing exports & typo.
- Update codebase to Angular 2 rc.6. Breaking change: now using NgModules, see readme for new usage guide.
- Fix PaginatePipe bug when itemsPerPage is passed as a string (#61)
- Fix change detection issue when correcting out-of-bounds currentPage value (#48), #69
- (build) Update karma-webpack, prune test output.
- Update codebase to Angular 2 rc.4.
- Fix default template showing up when using custom templates (#45)
- Fix buggy autoHide behaviour (#57)
- Fix infinite loop in PaginatePipe when used with other impure pipes.
- (build) Remove postinstall script which caused errors when using npm install. (moved to Travis file)
- Fix issue with custom templates still showing default template initially.
- Use OnPush change detection strategy for big efficiency gains (PR #40)
- Occasional flickering of active page link when changing pages also handled by the above.
- (build) Update Typings to 1.x
- Fix broken change detechtion when replacing collection items with new values (PR #36).
- Various small fixes and added a test (PR #33).
- Update to Angular 2 rc.1
- Note: This version is only compatible with Angular 2 beta.17 and above!
- Update
*ngFor
syntax to align with beta.17. - Update PaginatePipe to use new pipe API from beta.16 (PR #24).
- Update tests to reflect changes to async / inject API in beta.16
- Add missing devDependiencies to package.json
- Compatible with Angular 2 beta.15 and below.
- Fix bindings of the
directionLinks
andautoHide
attributes when used with literal values. (fixes #20) - Remove the styles which cause the links to truncate on small screens.
- Change the default ul class name from
.pagination
to.ng2-pagination
to avoid conflicts with existing CSS frameworks. (fixes #18)
- Fixed PaginationControlsCmp.outOfBoundCorrection() to prevent it returning
0
when the collection is empty (f7f9bd9). - Added System.register bundle build (
dist/ng2-pagination-bundle.js
)
- Fixed minificaton of demo app
- Use Sass for demo styles
- Removed
PaginationControlsDirective
, and simplified the way custom templates are specified (just put your template inside the<pagination-controls>
tags and use a local variable to access the API (see Readme). - Removed
PAGINATION_DIRECTIVES
exported constant, since there is only 1 component to export now.
Hello world! First beta release, starting changelog from here.