Created
May 14, 2017 10:44
-
-
Save anonymous/6f67ef24dfaabb14905d5dc1b5b7b706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr *ngFor="let post of posts | search: 'title': 'content': postSearch"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transform(value: any, field1: string, field2: string, search: string) | |
{ | |
if(search == "") { | |
return value; | |
} | |
return value.filter((res) => { | |
return res[field1].includes(search) || res[field2].includes(search); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment