]>
Commit | Line | Data |
---|---|---|
df98563e C |
1 | import { Injectable } from '@angular/core' |
2 | import { Subject } from 'rxjs/Subject' | |
3 | import { ReplaySubject } from 'rxjs/ReplaySubject' | |
00a44645 | 4 | |
df98563e | 5 | import { Search } from './search.model' |
00a44645 | 6 | |
0629423c | 7 | // This class is needed to communicate between videos/ and search component |
00a44645 C |
8 | // Remove it when we'll be able to subscribe to router changes |
9 | @Injectable() | |
10 | export class SearchService { | |
df98563e C |
11 | searchUpdated: Subject<Search> |
12 | updateSearch: Subject<Search> | |
00a44645 | 13 | |
df98563e C |
14 | constructor () { |
15 | this.updateSearch = new Subject<Search>() | |
16 | this.searchUpdated = new ReplaySubject<Search>(1) | |
00a44645 C |
17 | } |
18 | } |