I have a view that contains a collection, the collection takes the whole height of the view but I want to add some content after. Any elements that I add after it get disappeared (most probably behind the collection).
Anyone knows how I can resolve this?
Not going to be possible. Collection repeat renders items absolutely positioned. If you need content before or after a list, use ng-repeat instead
Is there no other way to use something like collection repeat so that unseen elements are removed from the DOM? ng-repeat in my case causes performance issues since I’m loading lots of images into the DOM. A collection repeat with options to add element before or after it would be great.
@romanrast I think a way to do this would be to inject another element in the end of the array you are iterating through with a distinct value. Using an if statement in the collection repeat you can identify when the last item is going to be shown and then show your after elements in it.
As far as the collection-repeat is concerned this should be just another element but you could style it so that it matches the background or make it transparent…etc
I will give it a try later on today and let you know if it works