|
|
|
@ -37,10 +37,8 @@ export class SearchComponent implements OnInit {
|
|
|
|
this.searchTerms
|
|
|
|
this.searchTerms
|
|
|
|
.debounceTime(300)
|
|
|
|
.debounceTime(300)
|
|
|
|
.distinctUntilChanged()
|
|
|
|
.distinctUntilChanged()
|
|
|
|
.switchMap(term => this.createAPIObservable(term))
|
|
|
|
.switchMap(name => this.createAPIObservable(name))
|
|
|
|
.subscribe((results)=>{
|
|
|
|
.subscribe(results=> this.results = results );
|
|
|
|
this.results = results;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|