Created
November 16, 2018 07:38
-
-
Save NetanelBasal/b465362fc653eae6e10a0d6b16da5944 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
@Component({...}) | |
export class SearchableContainerComponent { | |
private _count = 0; | |
get count() { | |
return this._count; | |
} | |
set count(count: number) { | |
this._count = count; | |
} | |
... | |
private handleSearchables(searchTerm: string) { | |
let count = 0; | |
for (const searchable of this.searchables) { | |
if (!searchTerm) { | |
searchable.show(); | |
count++; | |
} else { | |
if (this.match(searchable)) { | |
searchable.show(); | |
count++; | |
} else { | |
searchable.hide(); | |
} | |
} | |
} | |
this.count = count; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://obatalamimaagkronis.com/