title: AngularJS : multiple promise wait all
body: <p>I have a little question about multiple promise. 
  How can I wait that all promises will be done for return the final result.</p>
  
  <p>See my code :</p>
  
  <pre><code>getInfo : function(){
          return promiseA.then(function(result){
                 info  = result;
                 //this function have also promises 
                 return ServiceA.functionA(info.login)
                        .then(function(favouriteItems){
                            info.favorites = favouriteItems;
                            return $q.when(info);
                         });      
           });       
  },
  </code></pre>
  
  <p>My aims it's to wait the result of ServiceA.functionA before return value.</p>
  
  <p>Thanks</p>
  
  <p>K.L</p>