title: Run same async function multiple times with promises
body: <p>I have an async function like: </p>
  
  <pre><code>$scope.get_device_version = function(){
         return $q(function(resolve, reject){
              $http.get('/api/get_version')
                  .then(function(response) {
                      resolve(response.data.version);
                  },function(response) {
                      reject("Lost connection..");
              });
         });
  };
  </code></pre>
  
  <p>Question 1: Now I want to run that function 10 times in a row sequentially, what do I do?</p>
  
  <p>Question 2: Now I want to run the function until I get a desired answer from the http-request, what do I do?</p>