Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.22 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.22 KB

#Angular Pagination

About

Angular Pagination is a module for the AngularJS framework.

Usage

Simple example:

angular

    .module('app', ['angularPagination'])

    .controller('AppController', function($scope, Pagination) {
        var pagination = $scope.pagination = Pagination.create({
            itemsPerPage: 10,
            itemsCount: 100,
            maxNumbers: 5
        });

        pagination.onChange = function(page) {
            console.info('page=', page);
        };
    });
<div ng-controller="AppController">
    <ul class="pagination">
        <li ng-repeat="page in pagination.pages track by $index" ng-class="{active: pagination.isCurrent(page)}" ng-click="pagination.setCurrent(page)">
            <a href ng-bind="page"></a>
        </li>
    </ul>
</div>

See demo of full functionality

Demos

  1. Example of full functionality
  2. Example of directive 1
  3. Example of directive 2