How do I only show an element if nested ng-repeat is not empty?

前端 未结 6 1927
没有蜡笔的小新
没有蜡笔的小新 2020-12-25 11:01

I have a List of lists, created with a nested ng-repeat. Each outer ng-repeat contains a div with the label of its inner list (eg: \"Group A\"). I\'m now trying to create a

6条回答
  •  萌比男神i
    2020-12-25 11:39

    I have only slightly modified your list-widget.html, see it in action: plunkr

    The idea is simple - use the same filter for ng-show:

    {{ key }}

    The label will be visible only if there are some unfiltered items.

    In my example I'm using searchText for filter because I'm not familiar with CoffeeScript.

提交回复
热议问题