title: Waiting for an observable to finish
body: <p>I have a method that needs to wait for an observable to finish. I know observable are great for returning single pieces of data over time but I need to know when this observable has completely finished returning all of its data so I can run validation code on the object it has returned.</p>
  
  <p>The method getCustom subscribes to an observable run on the supplied url  which then returns the observable.</p>
  
  <p>I am not too sure if this is the best way to approach this situation so I would appreciate if anyone could give me any advice or a direction to handle this.</p>
  
  <pre class="lang-js prettyprint-override"><code>  private validateQuoteRetrievalAnswers(reference: string) {
  
           // Get the risk from the server
          this.riskManager.getRiskFromServer(reference);
  
          if (this.riskManager.risk) {
              // Validate risk that was returned
          }
      }
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>getRiskFromServer(quoteReference: string) {
  
      this.riskService.getCustom("Url").subscribe =&gt; {
          // need to know when the observable has returned the risk
      });
  
  }
  </code></pre>