Understanding RxJS in Our Application
Let’s use our newfound knowledge of RxJS to understand what's going on in our cocktails application.
We'll cover the following...
Let’s look at our cocktails application again. In the cocktail.service.ts
, we’re using the http.get()
method to request some data.
this.http.get('https://www.thecocktaildb.com/api/json/v1/1/search.php', {
params: {
s: query,
}
});
The http.get()
method will return an observable. It will emit the values retrieved by the API request. In the app.component.ts
component class file, ...