-
Notifications
You must be signed in to change notification settings - Fork 27.4k
1.3 makes $q's deferred.promise methods non-enumerable, breaks angular.extend #9933
Comments
yeah this was originally documented as a breaking change, but that version didnt land. however, theres no intention to change this |
I understand that this is a breaking change, but this will not change. The Note: In your code you are not trying to extend a promise (this is adding |
I appreciate the comments, Lucas and Caitlin. I think it's a sensible change, and don't expect it to roll back. There are other ways for us to have UI components provide a promise API. You folks are doing what you think is best for the framework, and the framework is great. Lots of people rely on the hard work you guys do. Sometimes there are very large code bases depending on it, and we look over the change logs very carefully when deciding when to upgrade. |
@lgalfaso want to amend the changelog to accomodate this though? my original bluebird port patch did include the breaking change notice, but jeff's was missing it. |
Will post a patch to fix the changelog in a few |
Recently upgraded from 1.2 to 1.3.1.
In 1.3, promise methods are on the prototype. They didn't used to be in 1.2.
In 1.2, This plunker shows I can extend with a promise.
In 1.3, This plunker shows I can no longer extend with a promise.
This means those methods are not enumerable any more.
angular.extend
only moves enumerable properties, which is sensible.Extending an object with a promise may seem like an odd idea, but a modal is a neat use case:
The text was updated successfully, but these errors were encountered: