{"id":13808954,"url":"https://github.com/sibiraj-s/angular-paginator","last_synced_at":"2025-04-28T19:59:14.547Z","repository":{"id":26874559,"uuid":"258417714","full_name":"sibiraj-s/angular-paginator","owner":"sibiraj-s","description":"📖 Pagination Component for Angular applications","archived":false,"fork":false,"pushed_at":"2025-04-26T20:11:38.000Z","size":6582,"stargazers_count":6,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T21:20:56.438Z","etag":null,"topics":["angular","angular-paginator","pagination"],"latest_commit_sha":null,"homepage":"https://sibiraj-s.github.io/angular-paginator/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":"Unmaintained","scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sibiraj-s.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["sibiraj-s"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-04-24T05:45:46.000Z","updated_at":"2025-04-26T20:11:41.000Z","dependencies_parsed_at":"2023-01-14T05:27:59.414Z","dependency_job_id":"284010c8-35c8-4648-9a49-e3e2afefe6cc","html_url":"https://github.com/sibiraj-s/angular-paginator","commit_stats":{"total_commits":234,"total_committers":5,"mean_commits":46.8,"dds":"0.42307692307692313","last_synced_commit":"33abd7053605f72c10d52b63a99b7b74c23091fe"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibiraj-s%2Fangular-paginator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibiraj-s%2Fangular-paginator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibiraj-s%2Fangular-paginator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibiraj-s%2Fangular-paginator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sibiraj-s","download_url":"https://codeload.github.com/sibiraj-s/angular-paginator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251053782,"owners_count":21529040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-paginator","pagination"],"created_at":"2024-08-04T01:01:55.948Z","updated_at":"2025-04-28T19:59:14.525Z","avatar_url":"https://github.com/sibiraj-s.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sibiraj-s"],"categories":["Third Party Components"],"sub_categories":["DOM"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sibiraj-s/angular-paginator\"\u003e\n   \u003cimg src=\"./assets/angular.png\" alt=\"angularPaginator\" width=\"350\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eAngular Paginator\u003c/h1\u003e\n\u003cp align=\"center\"\u003ePagination for Angular applications\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sibiraj-s/angular-paginator/actions\"\u003e\n    \u003cimg alt=\"Build Status\" src=\"https://github.com/sibiraj-s/angular-paginator/workflows/Tests/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/angular-paginator\"\u003e\n    \u003cimg alt=\"npm version\" src=\"https://badgen.net/npm/v/angular-paginator\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/angular-paginator\"\u003e\n    \u003cimg alt=\"npm downloads\" src=\"https://badgen.net/npm/dt/angular-paginator\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/sibiraj-s/angular-paginator/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"license\" src=\"https://badgen.net/github/license/sibiraj-s/angular-paginator\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Getting Started\n\n[edit in stackblitz](https://stackblitz.com/edit/angular-paginator)\n\n### Installation\n\nInstall via package managers such as [npm][npm] or [yarn][yarn]\n\n```bash\nnpm install angular-paginator --save\n# or\nyarn add angular-paginator\n```\n\n### Usage\n\nImport the `angular-paginator` module\n\n```ts\nimport { AngularPaginatorModule } from 'angular-paginator';\n\n@NgModule({\n  imports: [AngularPaginatorModule],\n})\nexport class AppModule {}\n```\n\nand in the template\n\n```html\n\u003cdiv *ngFor=\"let item of array | angularPaginator: { currentPage: currentPage }; let i = index\"\u003e\n  {{(currentPage - 1) * itemsPerPage + i +1}}. {{item}}\n\u003c/div\u003e\n\n\u003cangular-paginator (pageChange)=\"currentPage = $event\"\u003e\u003c/angular-paginator\u003e\n```\n\n### Paginator Pipe\n\nThe `angularPaginator` pipe accepts\n\n```bash\n{\n  id: 'ANGULAR_PAGINATOR_DEFAULT',\n  itemsPerPage: 10,\n  currentPage: currentPage\n}\n```\n\n- **id:** The default id is `ANGULAR_PAGINATOR_DEFAULT` when not specified. This is optional. Provide a unique id when multiple pagination instances are being used.\n- **itemsPerPage:** Number of items per page\n- **currentPage:** Current page number\n\n\u003e [!IMPORTANT]\n\u003e When using an id, ensure to provide the same id in both the pipe and directive of the same instance.\n\n### Paginator Directive\n\n```html\n\u003cangular-paginator\n  id=\"ANGULAR_PAGINATOR_DEFAULT\"\n  [maxSize]=\"5\"\n  [rotate]=\"true\"\n  [boundaryLinkNumbers]=\"false\"\n  [forceEllipses]=\"false\"\n  (pageChange)=\"currentPage = $event\"\n  #paginator=\"angularPaginator\"\n\u003e\n\u003c/angular-paginator\u003e\n```\n\n- **id:** The default id is `ANGULAR_PAGINATOR_DEFAULT` when not specified. This is optional. This must be provided if the id is specified in the pipe and should be the same as the pipe id\n- **maxSize:** Limit number for pagination size\n- **rotate:** Whether to keep the current page in the middle of the visible ones\n- **boundaryLinkNumbers:** Whether to always display the first and last page numbers. If maxSize is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary.\n- **forceEllipses:** Also displays ellipses when rotate is true and maxSize is smaller than the number of pages\n\n\u003e [!NOTE]\n\u003e maxSize refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential\n\n#### API\n\nYou can get access to the pagination instance(directive's api) using `#paginator=\"angularPaginator\"`. The following are the methods/properties available via the API\n\n- **pages** - Array of page objects.\n\n```ts\ninterface Page {\n  number: number;\n  text: string;\n  active: boolean;\n}\n```\n\n- **toPreviousPage()** - Sets the current page to previous (`currentPage - 1`)\n- **toNextPage()** - Sets the current page to next (`currentPage + 1`)\n- **toFirstPage()** - Sets the first page as current\n- **toLastPage()** - Sets the last page as current\n- **setCurrentPage(val)** - Sets the given page as current page.\n- **currentPage** - Returns the current page number\n- **firstPage** - Returns the first page number\n- **lastPage** - Returns the last page number\n\n[npm]: https://www.npmjs.com/\n[yarn]: https://yarnpkg.com/lang/en/\n[github]: https://sibiraj-s.github.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibiraj-s%2Fangular-paginator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsibiraj-s%2Fangular-paginator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibiraj-s%2Fangular-paginator/lists"}