Relative Content

Tag Archive for angulartypescriptrxjsobservable

How to Handle HTTP Calls with Derived Data Using Observables in Angular

In an Angular project, I am trying to retrieve data via an HTTP call. Simultaneously, I need to have an observable whose data is derived from the data obtained through the HTTP call. This way, when the first set of data is updated, the second set will be automatically updated as well. In the example, I have created Item as an object retrieved (a type consisting of id and name), while the derived data is the list of names. Moreover, in this context, I wouldn’t even know how to handle the forceUpdate method.