A word on Observables

We're definitely making a good use of the Angular HttpClient--as would be expected from any decent server-side fed SPA. Although it's not advisable to waste too much space talking about it, we should definitely spend a few words on its new abstraction pattern based upon Observables. One of the most relevant differences with the previous approach is that Observables have a lazy behavior by design, meaning that they won't fire unless there is a valid subscription issued by a .subscribe() function call.

This is a major perspective switch from the AngularJS Promises, that will execute right off the bat, regardless of how the client code will use their result afterward. Another important difference involves the .subscribe() ...

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.