Reputation: 89
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:
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
Reputation: 6650
You've put ui.grid.pagination
instead of ui-grid-pagination
in the html.
Upvotes: 1