title: array of promises angular ionic
body: <p>i am new to ionic framework and promises, this is part of my factory, Productos</p>
  
  <pre><code>...
      getCombinations: function(productId) {
              var promises = [];
              // todo: quizas filtrar por actividad
              url_to = 'http://example.com/api/combinations?display=full&amp;filter[id_product]=' + productId;
              $http({method: 'GET', url: url_to })
                      .then(function(response) {
             results = x2js.xml_str2json(response.data);
             angular.forEach(results.prestashop.combinations.combination, function(val, key) {
                                 var deferred = $q.defer();
                                 console.log('first deferred');
                                 console.log(deferred);
                 url_to = 'http://example.com/api/product_option_values?display=[name,color]' + '&amp;filter[id]=[' + val.associations.product_op
      tion_values.product_option_value[0].id + '|' + val.associations.product_option_values.product_option_value[1].id + ']';
                 $http({method: 'GET', url: url_to }).then(function(response) {
                                      results = x2js.xml_str2json(response.data);
                                      resultt = {'size': results.prestashop.product_option_values.product_option_value[0].name.language.__cda
      ta, 'color_hex':results.prestashop.product_option_values.product_option_value[1].color.__cdata, 'color_name': results.prestashop.product_option_values.product_option_value[1].name.language.__cdata}; 
                                      deferred.resolve(resultt); 
                 })
                 promises.push(deferred);
                 console.log('pushed');
                 console.log(promises);
             });
         }, function(response) {
                 return $q.reject(response.data);
                 //algo fue mal
         });
  
       return $q.all(promises);
  
        },
      ...
  </code></pre>
  
  <p>and in my controller</p>
  
  <pre><code>...
            Productos.getCombinations(productId) 
                      .then(function(data) {    
              console.log('getcombinations');
              console.log(data);
  ...
  </code></pre>
  
  <p>but my data is empty, could someone help me out, thanks in advance.</p>