title: Resolve in Angular for multiple api calls
body: <p>I am trying to call 3 different APIs before a component loads using the Resolve.</p>
  
  <p>This code below is written inside the resolve function and is returning an object with all response packaged.</p>
  
  <p><strong>Now When The component loads, before I receive the response from server.. it returns null for each of the keys in the object returned.</strong> </p>
  
  <p>Please help how do I solve this kinda issue. How do I stop it from returning until the response is not received from the API.</p>
  
  <pre class="lang-js prettyprint-override"><code>resolve() {
    this._apiFactory.getA().subscribe(response =&gt; {
       responseA = response;
    });
    this._apiFactory.getB().subscribe( response =&gt; {
       responseB = response;
    });
    this._apiFactory.getC().subscribe( response =&gt; {
       responseC = response;
    });
  
    return {
      'A': responseA ,
      'B': responseb ,
      'C': responseC 
    };
  }
  </code></pre>