Skip to content

Instantly share code, notes, and snippets.

@garciadanny
Last active August 29, 2015 14:09
Show Gist options
  • Save garciadanny/d9085933d47051b38586 to your computer and use it in GitHub Desktop.
Save garciadanny/d9085933d47051b38586 to your computer and use it in GitHub Desktop.
BlogPost: AngularJS Custom Directives
<select ng-model="status" ng-options="profile.status as profile.status for profile in profiles | unique:'status'" >
<option value="">All</option>
</select>
<select ng-model="city" ng-options="profile.city as profile.city for profile in profiles | unique:'city'" >
<option value="">All</option>
</select>
<table>
...
<tr ng-repeat="profile in profiles | filter:status:true | filter:city:true" >
<td>{{profile.name}}</td>
<td>{{profile.city}}</td>
<td>{{profile.status}}</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment