I’m referring to this search codepen and it works wonderfully, except that it does not have a “no results” template item. That is, I would like to have a “No results found.” item displayed if there are no results. How do I do this?
Thanks
I’m referring to this search codepen and it works wonderfully, except that it does not have a “no results” template item. That is, I would like to have a “No results found.” item displayed if there are no results. How do I do this?
Thanks
Try this
<ul class="list">
<li class="item" ng-repeat="item in filteredItems = (items | filter:data.searchQuery)">{{item.text}}</li>
<li class="item" ng-hide="filteredItems.length">No Search Results Found!</li>
</ul>
let me know if that works for you.