title: Angular wait for all subscriptions to complete
body: <p>In Angular a page makes multiple http calls on multiple actions, let's say button clicks. But when the last &quot;DONE&quot; button is pressed I want to make sure that all those requests are finished before it progresses. I tried to use <code>forkJoin</code> with observables but it triggers requests itself which is not what I want to do, I want other actions to trigger requests and just to make sure that async requests are finished when &quot;DONE&quot; is clicked. With promises I would just push promises to array and then do <code>Promise.all(allRequests).then(()=&gt;{})</code></p>
  <pre><code>observables: Observable&lt;any&gt;[];
  
  onBtn1Click(){
     let o1 = this.service.doAction1();
     this.observables.push(o1);
     
     o1.subscribe(resp =&gt; {
          //do action1
     });
  }
  
  onBtn2Click(){
     let o2 = this.service.doAction2();
     this.observables.push(o2);
     
     o2.subscribe(resp =&gt; {
          //do action2
     });
  }
  
  onDoneClick(){
     // I would like something like this just that it wouldn't trigger the requests but make sure they are completed. 
     forkJoin(this.observables).subscribe(()=&gt;{
       //Proceed with other things
     });
  }
  </code></pre>