tadasajon
tadasajon

Reputation: 14856

angularjs - how do I call a standard filter from within a filter I define?

Angular comes with a standard filter called "filter". I am defining my own filter and the first step I would like to take is to filter my list using the included "filter" filter -- how can I access it from within a new filter I am defining?

Upvotes: 0

Views: 95

Answers (1)

Rick Jolly
Rick Jolly

Reputation: 3009

Inject and use Angular's filter service:

var existingFilter = $filter('filtername'); 
var result = existingFilter('some_param'); 

Upvotes: 1

Related Questions