Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ViewChild('inputSearch') inputSearch: ElementRef;
- ngAfterViewInit(): void {
- fromEvent(this.inputSearch.nativeElement, 'keypress').pipe(
- map((el: KeyboardEvent) => el),
- debounceTime(500),
- distinctUntilChanged()
- ).subscribe((el2) => console.log(el2.target.value));
- }
Advertisement
Add Comment
Please, Sign In to add comment