1.0.0 • Published 7 years ago

laravel-angular-pagination v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

##Laravel Angular pagination directive

A simple Angular directive for AJAX pagination with Laravel.

##Getting started Import the directive into your Angular application:

angular.module('myApp', ['laravel-angular-pagination'])

If you are building your Angular application using Webpack or Browserify you can do it like this:

const paginator = require('./laravel-angular-pagination');

angular.module('myApp', [paginator.name]);

##Usage

<laravel-angular-pagination
    pagination="pagination"
    get-page="getComponents(arg1)"
    show-first-last="true"
    first-page-text="First page"
    last-page-text="Last page">
</laravel-angular-pagination>

...where:

  • pagination is the pagination JS object provided by Laravel when using the paginate() method and sending the results through AJAX. This parameter is required.
  • get-page is the function that will be invoked when clicking a link of the rendered paginator widget. Important: do not change the parameter name arg1 or otherwise the directive won't work. This parameter is required.
  • show-first-last is a boolean value that indicates wheter the First page and Last page buttons should be rendered. This parameter is optional, default to false.
  • first-page-text is a string that will be shown in the First page button, if rendered. This parameter is optional, default to First.
  • last-page-text is a string that will be shown in the Last page button, if rendered. This parameter is optional, default to Last.
1.0.0

7 years ago