# vuejs-paginator

> A Vue.js plugin to easily integrate pagination.

Latest version **2.0.2** (published 2017-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuejs-paginator
pnpm add vuejs-paginator
yarn add vuejs-paginator
bun add vuejs-paginator
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2017-08-14 |
| First published | 2016-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 283 |
| Author | Alex Kyriakidis |
| Maintainers | hootlex |
| Keywords | pagination, vuejs-pagination, vuejs-laravel, vuejs |

## Links

- npm: https://www.npmjs.com/package/vuejs-paginator
- Repository: https://github.com/hootlex/vuejs-paginator
- Homepage: https://github.com/hootlex/vuejs-paginator#readme
- Issues: https://github.com/hootlex/vuejs-paginator/issues
- npm.io page: https://npm.io/package/vuejs-paginator

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.0.0
- [vue-resource](https://npm.io/package/vue-resource.md) ^1.0.3

## Recent versions

- 2.0.2 (latest) — 2017-08-14
- 2.0.1 — 2017-04-23
- 2.0.0 — 2016-10-02
- 1.0.15 — 2016-09-14
- 1.0.14 — 2016-06-29
- 1.0.13 — 2016-06-13
- 1.0.12 — 2016-06-13
- 1.0.11 — 2016-05-31
- 1.0.10 — 2016-05-29
- 1.0.9 — 2016-05-28
- 1.0.8 — 2016-05-28
- 1.0.7 — 2016-05-28
- 1.0.6 — 2016-05-28
- 1.0.5 — 2016-05-28
- 1.0.4 — 2016-05-28
- … 4 more at https://npm.io/package/vuejs-paginator/versions

## README

# Vue.js Paginator [![CircleCI](https://circleci.com/gh/hootlex/vuejs-paginator.svg?style=shield&circle-token=:circle-ci-badge-token)](https://circleci.com/gh/hootlex/vuejs-paginator) [![npm downloads](https://img.shields.io/npm/dt/vuejs-paginator.svg)](https://www.npmjs.com/package/vuejs-paginator) <a href="https://www.npmjs.com/package/vuejs-paginator"><img src="https://img.shields.io/npm/v/vuejs-paginator.svg" alt="Version"></a> [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)
> A Vue.js plugin to easily integrate pagination in your projects.

VueJs Paginator is a simple but powerful plugin since it gives you access on how to render the data, instead of using a predefined table.

![vue paginator preview](http://i.imgur.com/2jah1qt.gif)

The way you use it is similar to Laravel's paginator.

## Installation
> For Vue 1.* use [v1.0.15](https://github.com/hootlex/vuejs-paginator/tree/v1.0.15).

### Through npm
``` bash
npm install vuejs-paginator --save
```

### From a cdn
```HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuejs-paginator/2.0.0/vuejs-paginator.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/vuejs-paginator/2.0.0/vuejs-paginator.min.js"></script>
```

## Usage
Use VPaginator in the HTML.
```html
<v-paginator resource_url="api/animals" @update="updateResource"></v-paginator>
```

Prepare the Vue instance.
```js
// if you are not using the cdn version you have to import VuePaginator.
// import VuePaginator from 'vuejs-paginator'
new Vue({
    data () {
      return {
        animals: []
      }
    },
    components: {
        VPaginator: VuePaginator
    },
    methods: {
      updateResource(data){
        this.animals = data
      }
    }
  ...
});
```

### Thats it

Every time a page is changed or fetched, resource variable will contain the returned data.

```html
<ul>
  <li v-for="animal in animals">
    {{ animal.name }}
  </li>
</ul>
```

### Documentation
[Here you can find the detailed Documentation](http://hootlex.github.io/vuejs-paginator/)

## Build Setup

``` bash
# install dependencies
npm install

# build for production with minification
npm run build

# run unit tests
npm run unit
# run all tests
npm test
```

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