Skip to content

Instantly share code, notes, and snippets.

@hunterloftis
Last active December 16, 2015 23:39
Show Gist options
  • Save hunterloftis/5515427 to your computer and use it in GitHub Desktop.
Save hunterloftis/5515427 to your computer and use it in GitHub Desktop.
Using filters programmatically in a custom directive
// current (works)
<div ng-repeat='movie in movies.titles | subcategories:categoryList()'>
// goal:
<div ng-repeat='filteredMovies()'>
link: function(scope, element, attrs) {
scope.filteredMovies = function() {
return appliedFilter(); // this is what I don't get
// guessing something like subcategoriesFilter.apply(scope.categoryList());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment