Angular Filter Chain
Chaining filters in angular.
Install
Download angular-filter-chain.js
(or minified file angular-filter-chain.min,js
) in project folder.
Or bower:
$ bower install --save angular-chain-filter
Or npm:
$ npm install --save angular-chain-filter
Usage
Include angular-filter-chain.js
to your project and then you can start using the angular-filter-chain
provider.
For example in controllers:
var app = angular; app;
API
chainFilters(items[, filterMap])
-
items Collection which used in filters.
-
filterMap Custom filters map which can be chained. Those filters will receive items data on first argument. Define property key as name and value as filter, you can use filter by access key. For example:
{ ... }var filteredItems =;
.applyFilter(filterName[, params])
User filter which provided by $filterProvider
.
.getItems()
Return filtered items.
Your original items will not change.
License
MIT Licensed