aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/search/search.service.ts
blob: 0480b46bd8581bae90353948ae4142f32c95481f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Injectable } from '@angular/core'
import { Subject } from 'rxjs/Subject'
import { ReplaySubject } from 'rxjs/ReplaySubject'

import { Search } from './search.model'

// This class is needed to communicate between videos/ and search component
// Remove it when we'll be able to subscribe to router changes
@Injectable()
export class SearchService {
  searchUpdated: Subject<Search>
  updateSearch: Subject<Search>

  constructor () {
    this.updateSearch = new Subject<Search>()
    this.searchUpdated = new ReplaySubject<Search>(1)
  }
}