{"id":18850501,"url":"https://github.com/manthanank/ng-pagination","last_synced_at":"2026-04-25T21:31:56.102Z","repository":{"id":244184323,"uuid":"777304048","full_name":"manthanank/ng-pagination","owner":"manthanank","description":"Ng Pagination","archived":false,"fork":false,"pushed_at":"2025-02-08T15:44:41.000Z","size":1032,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T04:56:51.660Z","etag":null,"topics":["angular","ng-pagination","pagination"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manthanank.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":["manthanank"],"open_collective":"manthanank","buy_me_a_coffee":"manthanank","patreon":"manthanank"}},"created_at":"2024-03-25T15:44:01.000Z","updated_at":"2025-07-14T04:23:22.000Z","dependencies_parsed_at":"2024-06-13T09:57:47.472Z","dependency_job_id":"6f356a28-244f-46b2-a7a6-f9657100d92f","html_url":"https://github.com/manthanank/ng-pagination","commit_stats":null,"previous_names":["manthanank/ng-pagination"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manthanank/ng-pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Fng-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Fng-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Fng-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Fng-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manthanank","download_url":"https://codeload.github.com/manthanank/ng-pagination/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Fng-pagination/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","ng-pagination","pagination"],"created_at":"2024-11-08T03:29:42.497Z","updated_at":"2026-04-25T21:31:56.083Z","avatar_url":"https://github.com/manthanank.png","language":"TypeScript","funding_links":["https://github.com/sponsors/manthanank","https://opencollective.com/manthanank","https://buymeacoffee.com/manthanank","https://patreon.com/manthanank"],"categories":[],"sub_categories":[],"readme":"# Ng Pagination\n\nThis is a simple pagination library for Angular applications.\n\n![npm](https://img.shields.io/npm/dw/@manthanankolekar/ng-pagination)\n![npm](https://img.shields.io/npm/dm/@manthanankolekar/ng-pagination)\n![npm](https://img.shields.io/npm/dy/@manthanankolekar/ng-pagination)\n![npm](https://img.shields.io/npm/dt/@manthanankolekar/ng-pagination)\n\n## Installation\n\nTo install this library, run:\n\n```bash\nnpm install @manthanankolekar/ng-pagination\n```\n\n## Usage\n\nImport in your `app.component.ts`:\n\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgPaginationComponent } from '../../../ng-pagination/src/lib/ng-pagination.component';\n\ninterface Item {\n  id: number;\n  title: string;\n  description: string;\n}\n\n@Component({\n  selector: 'app-root',\n  imports: [NgPaginationComponent, CommonModule],\n  templateUrl: './app.component.html',\n  styleUrl: './app.component.css',\n})\nexport class AppComponent implements OnInit {\n  title = 'Pagination Example';\n  items: Item[] = [];\n  displayedItems: Item[] = [];\n  \n  totalItems = 100;\n  itemsPerPage = 10;\n  currentPage = 1;\n\n  ngOnInit() {\n    // Generate dummy data\n    this.items = Array.from({ length: this.totalItems }, (_, i) =\u003e ({\n      id: i + 1,\n      title: `Item ${i + 1}`,\n      description: `Description for item ${i + 1}`\n    }));\n    \n    this.updateDisplayedItems();\n  }\n\n  onPageChange(page: number) {\n    this.currentPage = page;\n    this.updateDisplayedItems();\n  }\n\n  onItemsPerPageChange(itemsPerPage: number) {\n    this.itemsPerPage = itemsPerPage;\n    this.updateDisplayedItems();\n  }\n\n  private updateDisplayedItems() {\n    const startIndex = (this.currentPage - 1) * this.itemsPerPage;\n    const endIndex = startIndex + this.itemsPerPage;\n    this.displayedItems = this.items.slice(startIndex, endIndex);\n  }\n}\n```\n\nAdd the following to your `app.component.html`:\n\n```html\n  \u003cng-pagination \n    [totalItems]=\"totalItems\" \n    [itemsPerPage]=\"itemsPerPage\" \n    [currentPage]=\"currentPage\" \n    [itemsPerPageOptions]=\"[5, 10, 20, 50]\"\n    (pageChange)=\"onPageChange($event)\"\n    (itemsPerPageChange)=\"onItemsPerPageChange($event)\"\u003e\n  \u003c/ng-pagination\u003e\n```\n\n## Demo\n\n[StackBlitz](https://stackblitz.com/edit/ng-pagination)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanthanank%2Fng-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanthanank%2Fng-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanthanank%2Fng-pagination/lists"}