The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Build fully reactive APIs in Angular 2 with Observables

Build fully reactive APIs in Angular 2 with Observables

1:58
In this video you'll learn how Observables can improve the overall API design by designing APIs that accept Observables as arguments
Watch this lesson now
Avatar
egghead.io

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

Avatar
Nate

Really good one. Thanks!

In reply to egghead.io
Avatar
Brian

Either I'm too drunk, or that was really fast. Nicely done though.

Avatar
Vitalie

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.

Avatar
Andrei

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

Avatar
vtechmonkey

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

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?