title: call api serially in angular with rxjs
body: <p>suppose i have 3 service which is called in app.component and each services subscribe() in its own service, so how can i get response one by one.</p>
  
  <p>app.component.ts</p>
  
  <pre><code>ngOnInit() {
    this._salesstageService.refreshSalesstage();
    this._opportunityMailsService.RefreshTop50();
    this._opportunityService.getOpportunities();
  }
  </code></pre>
  
  <p>as example, i have three service.ts file but here you can see one service function to call api.</p>
  
  <p>app.service.ts</p>
  
  <pre><code>   getOpportunities() {
         return this.http.get(this._opportunitiesUrl)
          .do(res =&gt; this._errorService.checkResponse(res))
          .map(res =&gt; &lt;Opportunity[]&gt;JSON.parse(res.text(), 
                this.opportunityReviver))
          .catch(err =&gt; this._errorService.handleError&lt;Opportunity[]&gt;(err))
          .subscribe(
            opportunities =&gt; {
              if(opportunities instanceof Array){
                  this._opportunities = opportunities;
                 this.opportunities$.next(this._opportunities);
              }
          })
      } 
  </code></pre>