AngularJS: Show elements based on filtered results

If you ever need to show a container only if the filters of the repeated elements have one or more results, then you can do it using this code.

<span ng-show='filtered.length > 0'> <ul>
<li ng-repeat='el in filtered = (model | filter:searchText)'>

Source: StackOverflow

Leave a Reply

Your email address will not be published. Required fields are marked *