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

$q.when should be deprecated #13709

Open
basslagter opened this issue Jan 7, 2016 · 4 comments
Open

$q.when should be deprecated #13709

basslagter opened this issue Jan 7, 2016 · 4 comments

Comments

@basslagter
Copy link

Since Angular 1.4.1 there is a new (more consistent) method $q.resolve that does the exact same thing. I think it might be a good idea to deprecate the $q.when method and remove it in a future release.

@Narretz
Copy link
Contributor

Narretz commented Jan 11, 2016

We are not really removing features in the 1.x branch, so deprecation is a bit meaningless, but we can update the docs to recommend using $q.resolve instead of $q.when.

@tonyfinn
Copy link

The docs currently state:

resolve(value, [successCallback], [errorCallback], [progressCallback]);

Alias of when to maintain naming consistency with ES6.

This seems to be a reversal of what's currently recommended? https://docs.angularjs.org/api/ng/service/$q

@aciccarello
Copy link

The .resolve alias doesn't really change the size of angular in any significant way so removing .when wouldn't change much. I do agree that the docs should recommend resolve.

@gkalpak
Copy link
Member

gkalpak commented Sep 30, 2016

If someone wants to change all instances of $q.when() in the docs with $q.resolve() and submit a PR, I'd be happy to take a look.

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

No branches or pull requests

5 participants