bootstrap
bootstrap copied to clipboard
Pagination not resetting when total is zero
When total changes to 0 the pagination doesn't reset and stops functioning:
http://plnkr.co/edit/VDQtybdbS8SCMKQQsF4C?p=preview
Expected behaviour would be to reset it and show only 1st page. Potential fix:
$scope.$watch('totalItems', function() { $scope.totalPages = self.calculateTotalPages() || 1; });
This appears to be fixed in master by 8ecf93ed, calculateTotalPages won't return anything less than 1.
plunker: http://plnkr.co/edit/gaLE4mqClxnMoqsS002G?p=preview
Thnx @bsundsrud