title: How can i subscribe to multiple observables in angular2 at once and wait, if there is new data on each of them?
body: <p>i have a angular component, that uses 3 services. Each of those services has an observer, that i can subscribe to. The view of the component must be updated, if anything on the observed changes, that happens through websockets (feathers.js).
  I want the <code>doSomethingWithTheNewDataThatIsShownOnView()</code> to be called only once on ngInit and i think, i can do this with forkJoin:</p>
  
  <pre><code>private ngOnInit(): void {
      Observable.forkJoin(
          this.filesService.inputs$,
          this.filesService.outputs$,
          this.processesService.items$
      ).subscribe(
          data =&gt; {
            this.inputs = data[0];
            this.outputs = data[1];
            this.processes = data[2];
            this.doSomethingWithTheNewDataThatIsShownOnView();
            this.ref.markForCheck();
          },
          err =&gt; console.error(err)
      );
  
      this.filesService.find();
      this.processesService.find();
  }
  </code></pre>
  
  <p>That works as expected, but if there is new data on inputs$ Observable or outputs$ Observable, the subscribe is not beeing called again. It is only called, if all three Observables have new data. Is there something like "wait for a interval of 100ms if all three observables have new data, if not use only the new data of all observables, that have new data until now?"</p>
  
  <p>I hope you understand, what i want to do :D</p>
  
  <p>Greets</p>
  
  <p>Chris</p>