ng2-search-filter
ng2-search-filter copied to clipboard
Filtered Result
How can i get filtered result from filter?
Hi , If you see the example on README.md , filter returns an array of responses satisfying your query and thats your filtered result.
Sorry if i did not specify it clearly. What i mean is, for example
let member of members | filter:search
to let member of (filtered = (members | filter:search))
but this doesn't work. What would i do in other to get the filtered
. I wanted to use it somewhere else. Thanks :)
P.S. I'm using Angular4
@Kisekii you can use *ngIf
to store the intermediate value in another variable, check this commit
The relevant part:
<ng-container *ngIf="(items | filter:firstName) as filtered" >
<pre>{{ filtered | json }}</pre>
</ng-container>