Angular · Junior · Question 61 of 75
Why doesn't this.http.get('/api/users') send any request?
- ✓Correct answer: HTTP Observables are cold - the request starts only when something subscribes (e.g.
subscribe()or theasyncpipe) - 2
HttpClientbatches requests until the page is idle - 3GET requests must be enabled in
angular.json
Explanation
Each subscription sends a new request. That's why two async pipes on the same Observable can trigger two calls.