title: Wait for 2 methods to complete Angular 6
body: <p>I have two methods that return two different arrays using REST requests provided in services logic:</p>
  
  <pre><code> cartItemNodes: TreeNode[] = [];
   cartGroupNodes: TreeNode[] = [];
  
   getCartItems(){
    //subscribe to service observable filling the array 
    return this.cartItemNodes;
  }
  
   getCartGroups(){
    //subscribe to service observable filling the array 
    return this.cartGroupNodes;
  }
  </code></pre>
  
  <p>How can I build a <em>third method</em> </p>
  
  <blockquote>
    <p>getCartFinalNodes()</p>
  </blockquote>
  
  <p><strong>which</strong> waits until the first <strong>two</strong> are completed and then combines their results into a single array?</p>
  
  <pre><code>getCartFinalNodes(){
  //wait for first 2 methods
  return this.cartItemNodes.concat(this.cartGroupNodes);
  }
  </code></pre>