SHARE
TWEET
Untitled
a guest
Apr 10th, 2018
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public onInputChanged($event) {
- Observable.fromEvent($event.target, "input")
- .debounceTime(1000)
- .distinctUntilChanged()
- .map((event: any) => {
- return event.target.value;
- })
- .subscribe((value) => {
- console.log(value); // test <= 4x
- this.search(value);
- });
- }
- private search(searchCriteria: string) {
- this.globalSearchService.search(searchCriteria)
- .subscribe();
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
