1. 6
    Build fully reactive APIs in Angular 2 with Observables
    1m 58s

Build fully reactive APIs in Angular 2 with Observables

Share this video with your friends

Send Tweet

In this video you'll learn how Observables can improve the overall API design by designing APIs that accept Observables as arguments

Vitalie Andries
~ 8 years ago

Hi, could you help me with a hint (code are always welcome) how to and another operator (which?) to hold the request (like debounceTime did) until e.g. term.length is > 2.

Thank you.

Andrei Ivanovici
~ 7 years ago

Really nice quick course, thank you :). As a last step in the refactoring, maybe we can use the observable directly in the template, using the async pipe. I think that cleans to code eve further and also deals with managing the subscription in our component

vtechmonkey
~ 7 years ago

I had to add => to the search function

search = (terms: Observable<string>, debounceMs = 400)=>{
  	return terms
  	.debounceTime(400)
  	.distinctUntilChanged()
  	.switchMap (term => this.rawSearch(term));
  }