Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nadouani/7383600 to your computer and use it in GitHub Desktop.
Save nadouani/7383600 to your computer and use it in GitHub Desktop.
Angular JS: Show a list of filtered items or an empty message From http://stackoverflow.com/questions/14615495/angularjs-placeholder-for-empty-result-from-filter
<ul>
<li ng-repeat="bar in filteredBars = (bars | filter:barFilter)">
{{bar.name}}
</li>
</ul>
<p ng-hide="filteredBars.length">Nothing here!</p>
@damoahdominic
Copy link

Wow!

@SKempin
Copy link

SKempin commented Jul 24, 2017

I am trying to achieve a placeholder with a dynamic filter, how can I achieve this?

Thanks!

*ngFor="let example of scale.examples | filter:{ type: 'riff'}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment