search.service.ts 307 Bytes
Newer Older
mdsecurity's avatar
mdsecurity committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Injectable, EventEmitter } from '@angular/core';
import { Subject } from 'rxjs/Subject';

@Injectable()
export class SearchService {
  private searchArg = new Subject<string>();
  $seachArg = this.searchArg.asObservable();

  constructor() { }
  newTerm(term){
    this.searchArg.next(term);
  }
}