Last active
November 12, 2019 01:29
-
-
Save oleersoy/b014ce2647684bb75fe27fea1b4a9cb2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ngAfterViewInit() { | |
// server-side search | |
fromEvent(this.input.nativeElement,'keyup') | |
.pipe( | |
untilDestroyed(this), | |
filter(Boolean), | |
debounceTime(150), | |
distinctUntilChanged(), | |
tap(async (event:KeyboardEvent) => { | |
console.log(`The input value is ${this.input.nativeElement.value}`); | |
}) | |
) | |
.subscribe(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment