Skip to content

Instantly share code, notes, and snippets.

@seveves
Created February 20, 2017 07:05
Show Gist options
  • Save seveves/b1947eb9c47359c1951b78eabbae0e48 to your computer and use it in GitHub Desktop.
Save seveves/b1947eb9c47359c1951b78eabbae0e48 to your computer and use it in GitHub Desktop.
RxJS problem
languageChangedSubscription = this.languageService.languageChanged
.subscribe((language: string) => {
this.updateViewData(language);
});
updateViewData(language: string) {
this.searchResults = this.searchBox.valueChanges
.let((text: Observable<string>) => this.filterAndDebounceFor(text)(150))
.switchMap((searchTerm: string) => this.helpDataService.search(searchTerm, language));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment