michaelbromley / michaelbromley/angularUtils

dirPagination Not Showing

Open
#430 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2k
Forks
842
PR merge metrics
No merged PRs in 30d

Description

I am trying to use dirPagination in a table in an ng-repeat. My problem is that I cannot get the control to show. I just got the code today, so I assume that it is the "latest" version.

Here is my app.config block where I specify the template location:

```
app.config([
'$compileProvider', '$httpProvider', 'paginationTemplateProvider',
function ($compileProvider, $httpProvider, paginationTemplateProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|javascript):/);

paginationTemplateProvider.setPath('/Scripts/dirPagination.tpl.html');
// Initialize get if not there
if (!$httpProvider.defaults.headers.get) {
$httpProvider.defaults.headers.get = {};
}

// Enables Request.IsAjaxRequest() in ASP.NET MVC
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

// Disable IE ajax request caching
$httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT';
}
]);
```

I have included it in my app like so:

`var app = angular
.module('myModule', [
'ui.bootstrap',
'checklist-model',
'ssq.shared',
'ngAnimate',
'ngTouch',
'ui.grid',
'ui.grid.pagination',
'ui.grid.selection',
'ui.grid.exporter',
'ui.grid.autoResize',
'ui.grid.saveState',
'ui.router',
'cgBusy',
'ui.mask',
'ngFileUpload',
'ngSanitize',
'angularUtils.directives.dirPagination'
]);`

Here is where I am trying to use it in my ng-repeat:
```







Description
Document Link
File Type/Size
Upload Date
Uploaded By



Open
Open



















```

I cannot get the control to display at all.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the app.config block, the configured /Scripts/dirPagination.tpl.html path, and the dir-paginate and dir-pagination-controls markup in the table. Check how the directive is being given its collection and whether the template request succeeds; done means the pagination controls render for each grouped table.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.