1.0.1 • Published 3 years ago
ng-laravel-pagination v1.0.1
Ng Laravel Pagination
A Angular pagination component for Laravel paginator that works with Bootstrap.
Install
npm install ng-laravel-pagination
Usage
Import Library in .module.ts:
import {NgLaravelPaginationModule} from 'ng-laravel-pagination';
@NgModule({
...
imports: [
...
NgLaravelPaginationModule
],
...
})
Use the component:
<ng-laravel-pagination [data]="laravelData" align="right" [pageDesc]="true" (changePage)="changePage($event)"></ng-laravel-pagination>
Callback Events
changePage(pagination): void {
console.log(pagination);
}
API
Props
Name | Type | Default | Description |
---|---|---|---|
data | Object | An object containing the structure of a Laravel paginator response or a Laravel API Resource response. | |
align | String | right | Define the alignment of the pagination content. |
pageDesc | Boolean | true | Hide/Show Pagination description |
theme | String | theme-default | Theme values are theme-default theme-round theme-non-button |
Events
Name | Description |
---|---|
changePage | Triggered when a user changes page. Passes the new pagination object as a parameter. |
License
Released under the MIT License, see LICENSE.