title: How to know when all Angular2 HTTP calls are finished
body: <p>I'm writing an application that will monitor the current build number of all of our applications across different servers.  This is done by making an http request to a txt file in every application.  I'm doing that using a foreach loop.  </p>
  
  <p>The issue I'm having is that I'm not sure how (using Observables) to know when all of the requests are finished.  </p>
  
  <p>As the requests come back, I add the response as a property of an array of objects.  Then once I have all of the data, I bind it to the component's template, where it gets filtered by a Pipe.  As such, I need to make sure I don't bind it until all of the data is finished coming down.  </p>
  
  <p>Here is how I'm getting the data:</p>
  
  <pre><code>this.apps.forEach(app =&gt; {
    app.Environments.forEach(env =&gt; {
      this._buildMonitorService.getBuilds(env.URL)
        .subscribe((data) =&gt; {     
          setupBuilds(this.apps,data.url,data._body);
        });                
    });
  });
  </code></pre>
  
  <p><code>setupBuilds</code> adds the response to my array of applications.  </p>
  
  <p>The thing I'm looking for is effectively a <code>Promise.all</code> where I'll bind 
  <code>this.builds</code> to the data setup in <code>setupBuilds</code> but I don't know how to do that with rxjs observables</p>