title: How to return a failed promise?
body: <p>How would I return a promise but invoke its failure block immediately? Here's a gnarly way to do it:</p>
  
  <pre><code>if (fail) {
      var q = $q.deferred();
  
      $timeout(function() {
          q.reject("")
      }, 1);
  
      return q.promise;
  } else {
    return $http.get("/").then(function(data) {});
  }
  </code></pre>