Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$q.race() method to match ES6 #12929

Closed
mikehayesuk opened this issue Sep 23, 2015 · 1 comment
Closed

$q.race() method to match ES6 #12929

mikehayesuk opened this issue Sep 23, 2015 · 1 comment

Comments

@mikehayesuk
Copy link

Hi,

Any chance of a $q.race() method being implemented? $q is compatible with the ES6 promise spec apart from the race method.

Thanks

@jrencz
Copy link

jrencz commented Sep 25, 2015

👍

@bluehayes you can implement it yourself easily if you need it by using $provide.delegate(). Here's a quick (and probably having some issues so be warned!) attempt https://gist.github.com/jrencz/0bf3917d0a28c2b87dff

@Narretz Narretz added this to the Ice Box milestone Sep 25, 2015
yihangho added a commit to yihangho/angular.js that referenced this issue Jun 13, 2016
Implement $q.race. $q.race takes in an array or hash of promises and
returns a promsie that is resolved as soon as the first promise is
resolved.

Closes angular#12929
@petebacondarwin petebacondarwin modified the milestones: 1.5.x, Ice Box Jun 15, 2016
petebacondarwin pushed a commit that referenced this issue Jun 17, 2016
Implement $q.race. $q.race takes in an array or hash of promises and
returns a promise that resolves or rejects as soon as one of those promises
resolves or rejects, with the value or reason from that promise.

Closes #12929
Closes #14757
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants