Reacting to changes

One of the reasons we chose the Reactive approach was to be able to react to the changes issued by the user. We can do that by subscribing to the valueChanges property exposed by the FormGroup and FormControl classes, which returns a RxJS Observable that emits the latest values.

Truth be told, we've been using Observables since Chapter 3, Frontend with Angular, when we did subscribe to the get() method of HttpClient to handle the HTTP response received by the web server for the first time; we extensively used them again in Chapter 5, Client-Server Interactions, when we had to implement the support for the put() and post() methods as well, and we still use them wherever and whenever we need to fetch the JSON data that feeds ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.