There are many containers with lists that are dynamically loaded from the array that I get from Jason. There can be a lot of data and the most different, therefore I try to make check that there are no empty containers. Immediately I thought of using ng-if, it seemed most appropriate, but that was the problem.
<div> <h1>Birds</h1> <ul> <li ng-if="bird.type === 'bird'" ng-repeat="bird in creatures">{{bird.name}}</li> </ul> </div> There are a lot of objects in the array and we need to check them one by one, so first we need to start ng-repeat, but in this case I can't hang it on the parent div. the title will be repeated in each object. I cling it to li, but in this case I’m already on the parent element is not ng-if = "bird.type === 'bird'", because it isn’t yet specified at that time. And the problem is that if there is no list, then there will be only a title on the page .. If you could check that the list is empty - and hide the parent element, is there such a possibility? Plunk example
creatures.lengthwill be== 0. here you have the condition for the block of absence of elements - Vasily Barbashev