Angular pitfall: Multiple HTTP requests with RxJS and observable$ | async

by Hallstein Brøtan

I recently discovered that our Angular app was making multiple HTTP requests unintentionally to the same REST API endpoint. The app was using the HttpClient introduced in Angular 4.3, which enables direct access to the JSON response when subscribing to the Observable from the HTTP request. The HTML markup…