# ang-pagination

> A simple lightweight package for managing pagination inside angular applications

Latest version **1.0.54** (published 2019-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ang-pagination
pnpm add ang-pagination
yarn add ang-pagination
bun add ang-pagination
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.54 |
| Published | 2019-12-01 |
| First published | 2019-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 97.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bharath Ravi |
| Maintainers | bharathravi |
| Keywords | pagination, angular pagination, pager |

## Links

- npm: https://www.npmjs.com/package/ang-pagination
- Repository: https://github.com/BharathRavi27/ang-pagination
- Issues: https://github.com/BharathRavi27/ang-pagination/issues
- npm.io page: https://npm.io/package/ang-pagination

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 1.0.54 (latest) — 2019-12-01
- 1.0.53 — 2019-11-30
- 1.0.52 — 2019-11-30
- 1.0.51 — 2019-11-30
- 1.0.5 — 2019-11-30
- 1.0.4 — 2019-11-30
- 1.0.3 — 2019-11-30
- 1.0.2 — 2019-11-30
- 1.0.1 — 2019-11-30
- 1.0.0 — 2019-11-30
- 0.0.0 — 2019-11-30
- 0.0.1 — 2019-11-30

## README

# ang-pagination --- Pagination for Angular

A simple lightweight package for managing pagination inside angular applications.

## Demo

Play with it on StackBlitz here: https://stackblitz.com/edit/ang-pagination


## Quick Start

```
npm install ang-pagination --save
```

## Simple Example

```TypeScript
// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { AngPaginationModule } from 'ang-pagination';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AngPaginationModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

```

```TypeScript
// app.component.ts
import {Component} from '@angular/core';

@Component({
    selector: 'app-component',
    template: `
            <tbody>
              <tr *ngFor="let item of data | angPagination: { itemsPerPage: 5 }">
                <td>{{item.id}}</td>
                <td>{{item.title}}</td>
                <td>{{item.body}}</td>
              </tr>
            </tbody>
               
    <ang-pagination (pageChanged)="pageChanged($event)" [totalItems]="data.length"></ang-pagination>
    `
})
export class MyComponent {
    itemsPerPage: number = 5;
    data: any[] = [{"id": 1,"title": "sunt facere "},{"id": 2,"title": "qui e"}]; // any array

  pageChanged(e) {
      // do things on page change
  }
}
```

## License

MIT

---
_Source: https://npm.io/package/ang-pagination · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
