title: Angular: $q.defer() vs $q()
body: <p>In Angular, the following snippets seem to be equivalent:</p>
  
  <pre><code>let deferred = $q.defer();
  if(whatever) {
     deferred.resolve('something');
  }
  else {
     deferred.reject('nah');
  }
  return deferred.promise;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>return $q((resolve,reject) =&gt; {
      if(whatever) {
         resolve('something');
      }
      else {
         reject('nah');
      }
  });
  </code></pre>
  
  <p>My question: if they aren't equivalent, how do they differ? If they are equivalent, is there a compelling reason for preferring one over the other?</p>