Skip to content

Instantly share code, notes, and snippets.

@LayZeeDK
Last active October 19, 2018 21:12
Show Gist options
  • Save LayZeeDK/08cc41d90872a0396dd24c8c3a9cb6a9 to your computer and use it in GitHub Desktop.
Save LayZeeDK/08cc41d90872a0396dd24c8c3a9cb6a9 to your computer and use it in GitHub Desktop.
Basic search presenter
import { Subject } from 'rxjs';
export class SearchPresenter {
private _searchQuery: Subject<string> = new Subject();
searchQuery: Observable<string> = this._searchQuery.asObservable();
search(query: string): void {
this._searchQuery.next(query);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment