angular/angular.js — pull request #8311 by caitp (2014-07-23 21:13:09+00:00)
Title: feat($q): add streamlined ES6-style interface for using $q

This potentially helps lead the way towards a more performant fly-weight implementation, as discussed earlier in the year. Using a constructor means we can put things in the prototype chain, and essentially treat $q as a Promise class, and reuse methods as appropriate.

Short of that, I feel this style is slightly more convenient and streamlined, compared with the older API.

(#8067 originally contained this PR, but has been refactored into a staging branch for the remaining changes left in #8300 --- This should be much easier to review as the first of a set of 3 changes).