angular/angular.js — pull request #3044 by ProLoser (2013-06-24 23:16:44+00:00)
Title: feat(q): make $q.resolve() and $q.reject() return the promise object

This will allow people to be slightly more elegant:

instead of:
```
var deferred = $q.defer();
deferred.resolve('foobar');
return deferred.promise;
```
we can now do:
```
return $q.defer().resolve('foobar');
```

This also slightly makes `$q.reject()` redundant:
```
return $q.defer().reject('barfoo');
```