Closed ThiagoJem closed 9 years ago
Sorry, I don't understand. Can you show code or screenshots?
Hi compact, First I want to thank you for providing this excellent tool.
I'll try to explain better (sorry , I understand little English ): I have a pagination in my site(https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination) the images that are on page 2 onwards , when clicked , opens the first image of page 1. I would like to open the corresponding image , how can I do this?
I posted a vídeo for demonstration, please view...
Link vídeo: http://tinypic.com/m/il9ceg/1
On page 1 the corresponding images to click open normally. On page 2 opens the corresponding images page 1.
It looks like you are using $index
as in Lightbox.openModal(images, $index)
, but each page in the pagination starts it over at 0, so $index
goes 0, 1, 0, 1, 0, 1...
instead of 0, 1, 2, 3, 4, 5...
I found a relevant answer in that library: https://github.com/michaelbromley/angularUtils/issues/76
Add this to your controller:
$scope.imageIndex = $scope.$index + ($scope.currentPage - 1) * $scope.pageSize;
Then change your $index
to imageIndex
.
It did not work. I thought better and I will make content open on another page , I will most benefit and ease in other implementations. Valeu, abraço!
Images that are not on the home page (index) will not open . How to configure to display the current image that are on other pages in the paging ?
Thank you!