{{key}}
{{key}}
{{key}}

I want to hide the parent div if child div is empty as Filter results empty

79 Views Asked by At
<div ng-repeat="(key, val) in report.practices">
    <div >{{key}}</div>
  <div ng-repeat="(severityIndex, severityName) in val">
    <div ng-if="filterResults.length" >
        <span >{{severityIndex}}</span>
    </div>
    <div ng-repeat="(practice, value) in val[severityIndex] | filter:searchText.value as filterResults">
      <span >{{practice}}</span>
    </div>
  </div>
</div>

I am printing in the below format,

Category :
SubCategory :
Content :

In the above format I applies filter search for Content and applied the filter results length to SubCategory. So that If no content filtered then Subcategory hide successfully. Now also I want to hide the Category(parent), if no Subcategory is filtered.

Please help me how could I achieve this ?

0

There are 0 best solutions below