1

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> 

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much for your response! This is what happens when you copy and paste.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.