Skip to content

Instantly share code, notes, and snippets.

@teeaich
Created August 13, 2013 15:27
Show Gist options
  • Save teeaich/6222353 to your computer and use it in GitHub Desktop.
Save teeaich/6222353 to your computer and use it in GitHub Desktop.
filter on objects in angular
{{ games|filter:'street' }} // all games containing "street" in any property
{{ games|filter:'!street' }} // all games NOT containing "street" in any property
{{ games|filter:{name:'street'} }} // all games containing "street" in their name
{{ games|filter:{name:'street'}:true }} // all games named exactly "street"
{{ games|filter:{name:'street', device:'PS3'} }} // all games containing "street" in their name and PS3 in their device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment