ng-falcor icon indicating copy to clipboard operation
ng-falcor copied to clipboard

How to use your library with angularjs filter?

Open jean-morissette opened this issue 9 years ago • 1 comments

First, congratulations for your library!

Consider this example:

<div class="todo-list-item" ng-repeat="i in range | filter:searchText">

Since it performs a loop on indices, instead of JSON objects, how is-it possible to use the angular filter in this case?

Or would you recommend another approach to filter a list?

Thanks!

jean-morissette avatar Mar 24 '16 23:03 jean-morissette

That's a good question and I'm open to suggestions. Two ideas off the top of my head:

  1. ng-if="ngf('some_list', i, 'some_prop').indexOf(searchText)"
  2. Create a custom filter that accepts i and otherwise operates similar to the above.

What do you think?

greim avatar Mar 25 '16 16:03 greim