T. Holland
T. Holland

Reputation: 89

angular ui-grid pagination v3.0.0-RC.18 not working

How do you get pagination to work/controls to appear using angular ui-grid? Has anyone successfully done it?

I am aware of the tutorial.

Things I've tried that haven't worked:

  1. Using the tutorial as a guide.
  2. Remaking the example outside of my project.
  3. Using different versions of ui-grid; I've tried RC.12 - RC.21.
  4. Using different versions of angularjs; I've tried 1.2.26 - 1.3.15.

I know that the ui.grid.pagination module is in the ui-grid js file I'm using and that it is being picked up by my controller. I tested this by changing the name of the directive in the ui-grid js file.

Code from controller:

var app = angular.module('myApp', ['ui.grid', 'ui.grid.pagination', 'ngAnimate', 'ngTouch']);
    app.controller('myCtrl', ['$scope', '$http', function ($scope, $http) {

        $scope.gridOptions = {
            enablePagination: true,
            enableFiltering: true,
            enableSorting: true,
            enableHorizontalScrollbar: false,
            enablePaginationControls: true,
            paginationPageSizes: [25, 50, 75],
            paginationPageSize: 25,
        }

HTML:

<div class="container-fluid">
    <h1>Processes</h1>
    <div ng-controller="myCtrl">
        <div ui-grid="gridOptions" ui.grid.pagination></div>
    </div>
</div>

Upvotes: 1

Views: 454

Answers (1)

PaulL
PaulL

Reputation: 6650

You've put ui.grid.pagination instead of ui-grid-pagination in the html.

Upvotes: 1

Related Questions