$q.defer().promise;

//bad
promise.then(function (val) {
  //Cannot return self
  return promise;
});

//good
promise.then(function (val) {
  return &#39;some other value&#39;;
});
</code></pre>

</div>


