Matt - Please share your answer for pagination with ABP,
I am seeing only first 10 rows bottom no links for pagination are showing in the browser, in view source I can see the div but they are not appearing. Not sure what to go further with pagination.
Adding a directive for pagination is not helping me and frustrating.
For simple pagination I am having this issue which makes me to think this boiler plate framework is going to keep me in trouble future. Almost deciding to drop from this framework.
Yes, here is the error.
Pagination directive: the pagination controls cannot be used without the corresponding pagination directive, which was not found at link time.
Here is my code in cshtml. With this I will see first 10 rows of mylist which has around 400 rows, but didin't get any page numbers so that I can navigate, in Chrome console I am getting the above error.
<div dir-paginate="jobloc in vm.pagedJobLocationList | filter:search| itemsPerPage: 10"
total-items="totalUsers"
current-page="pagination.current"
pagination-id="newPageNumber">
<span>{{jobloc.jobLocationID}}</span>
<span> </span>
<span class="task-assignedto">{{jobloc.jobLocationName}}</span>
<span> </span>
<span class="task-assignedto">{{jobloc.city}}</span>
<span> </span>
<span class="task-assignedto">{{jobloc.state}}</span>
<span> </span>
<span class="task-assignedto">{{jobloc.zip}}</span>
@<button ng-click="vm.editJobLocation(jobloc)" title="@L("Edit")" class="btn btn-sm btn-info">
<i class="icon-pencil"></i>
</button>@
</div>
<div class="text-center"> <dir-pagination-controls boundary-links="true" direction-links="true" on-page-change="pageChanged(newPageNumber)" template-url="/App/utils/dirPagination.tpl.html"></dir-pagination-controls> </div>
Hi,
I am new to Angular JS, I am trying to use pagination lot of hassle. I saw response from By MattDunnDC who said it is working with one controller, if you don't mind can you please share the code so that I can try on my end too.
I am using the same <a class="postlink" href="https://github.com/michaelbromley/angul">https://github.com/michaelbromley/angul</a> ... pagination
getting this error in browser console.
dirPagination.js:271 Pagination directive: the pagination controls cannot be used without the corresponding pagination directive, which was not found at link time.
I did add dirPagination.js in shared layout and added directive in app.js like this
var app = angular.module('app', [ 'ngAnimate', 'ngSanitize',
//'ngRoute',
'angularUtils.directives.dirPagination',
'ui.router',
'ui.bootstrap',
'ui.jq',
'abp'
]);
Not sure why it is unable to link it.
Fixed by changing line vm.refreshJobLocations();
After function declaration.
As per your earlier suggestion when I load URL in Chrome I am getting error like this for this
vm.refreshJobLocations is not a function
angular.js:11655TypeError: vm.refreshJobLocations is not a function at new <anonymous> (<a class="postlink" href="http://localhost:6247/App/Main/views/jobLocation/list.js:25:16">http://localhost:6247/App/Main/views/jo ... t.js:25:16</a>) at Object.e [as invoke] (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:36:315">http://localhost:6247/Scripts/angular.min.js:36:315</a>) at w.instance (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:75:516">http://localhost:6247/Scripts/angular.min.js:75:516</a>) at <a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:59:18">http://localhost:6247/Scripts/angular.min.js:59:18</a> at r (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:7:408">http://localhost:6247/Scripts/angular.min.js:7:408</a>) at B (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:59:2">http://localhost:6247/Scripts/angular.min.js:59:2</a>) at g (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:51:335">http://localhost:6247/Scripts/angular.min.js:51:335</a>) at <a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:50:444">http://localhost:6247/Scripts/angular.min.js:50:444</a> at <a class="postlink" href="http://localhost:6247/Scripts/angular-ui-router.min.js:7:22912">http://localhost:6247/Scripts/angular-u ... js:7:22912</a> at $ (<a class="postlink" href="http://localhost:6247/Scripts/angular.min.js:70:197">http://localhost:6247/Scripts/angular.min.js:70:197</a>)
That is the problem, I am unable to see anything in the logs, my page loads with whatever static content it has. Event I kept alert it comes until that point but never invokes service.
I fixed, not sure what happened I ran Update database again and then cleaned and rebuild it worked now I am able to get the default repository.