This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix($resource): remove (broken) support for _promise as timeout
_
#13393
Labels
Milestone
Comments
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 7, 2015
… promise This reverts commit 7170f9d. Fixes part of angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 7, 2015
…rted Fixes part of angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 7, 2015
…ning Promises never worked correctly as values for `timeout` in `$resource`, because the same value has to be re-used for multiple requests (and it is not possible to `angular.copy()` a promise). Now (in addition to ignoring a non-numeric `timeout`), a warning is logged to the console using `$log.debug()`. Partly fixes angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 8, 2015
…rted Fixes part of angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 8, 2015
…ning Promises never worked correctly as values for `timeout` in `$resource`, because the same value has to be re-used for multiple requests (and it is not possible to `angular.copy()` a promise). Now (in addition to ignoring a non-numeric `timeout`), a warning is logged to the console using `$log.debug()`. Partly fixes angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 8, 2015
…ning Promises never worked correctly as values for `timeout` in `$resource`, because the same value has to be re-used for multiple requests (and it is not possible to `angular.copy()` a promise). Now (in addition to ignoring a non-numeric `timeout`), a warning is logged to the console using `$log.debug()`. Partly fixes angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 8, 2015
…rted Fixes part of angular#13393.
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Dec 8, 2015
…ning Promises never worked correctly as values for `timeout` in `$resource`, because the same value has to be re-used for multiple requests (and it is not possible to `angular.copy()` a promise). Now (in addition to ignoring a non-numeric `timeout`), a warning is logged to the console using `$log.debug()`. Partly fixes angular#13393.
gkalpak
added a commit
that referenced
this issue
Dec 8, 2015
…ning Promises never worked correctly as values for `timeout` in `$resource`, because the same value has to be re-used for multiple requests (and it is not possible to `angular.copy()` a promise). Now (in addition to ignoring a non-numeric `timeout`), a warning is logged to the console using `$log.debug()`. Partly fixes #13393. BREAKING CHANGE: Possible breaking change for users who updated their code to provide a `timeout` promise for a `$resource` request in version 1.4.8. Up to v1.4.7 (included), using a promise as a timeout in `$resource`, would silently fail (i.e. have no effect). In v1.4.8, using a promise as timeout would have the (buggy) behaviour described in #12657 (comment) (i.e. it will work as expected for the first time you resolve the promise and will cancel all subsequent requests after that - one has to re-create the resource class. This is feature was not documented.) With this change, using a promise as timeout in 1.4.9 onwsards is not allowed. It will log a warning and ignore the timeout value. If you need support for cancellable `$resource` actions, you should upgrade to version 1.5 or higher.
Closed by #13462. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
7170f9d which added support for using a promise as
timeout
in$resource
, introduced a bug (where you had to re-create the resource class after every cancelled request and failing to do so would abort all subsequent calls). See #12657 (comment) for more context.This has been fixed in
v1.5.x
with #13210, but we need to also fix it onv1.4.x
(#13210 is not suitable for backporting tov1.4.x
since it adds a new feature and changes the behaviour of$resource
to some extent).As discussed in #13210 (comment), for
v1.4.x
we need to:The text was updated successfully, but these errors were encountered: