We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60c86e5 commit fee46aeCopy full SHA for fee46ae
src/directives/pagination/dirPagination.spec.js
@@ -644,6 +644,15 @@ describe('dirPagination directive', function() {
644
$scope.$apply();
645
expect($scope.myCallback).toHaveBeenCalledWith(2);
646
});
647
+
648
+ it('should pass the previous page number to the callback', function() {
649
+ compileWithAttributes(' on-page-change="myCallback(oldPageNumber)" ');
650
+ var pagination = containingElement.find('ul.pagination');
651
652
+ pagination.children().eq(3).find('a').triggerHandler('click');
653
+ $scope.$apply();
654
+ expect($scope.myCallback).toHaveBeenCalledWith(1);
655
+ });
656
657
658
describe('total-items attribute', function() {
0 commit comments