My ng-repeat container div contains multiple images, each with a corresponding div next to it. Using $last, I can make sure only the div of the final image is visible after all images.
However, I also have a filter button on the page that hides certain images when clicked, using ng-show. My issue is that I want the div next to the last visible image to remain shown, even after some images are hidden. It seems like $last doesn't take into account the ng-show/hide value. How can I ensure that the last visible image's div remains visible?
<div class='container' ng-repeat="image in album">
<div class='wrapper' ng-show="getFilterValue(image.imageId)">
<div><img src='{{image.src}}'></div>
<div class='embellish-end' ng-class='{'hidden':!$last}'>The End</div>
</div>
</div>
I would greatly appreciate any assistance with this problem!