This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Shorthand for defining promise error handlers - $q.fail() #2048
Closed
Description
Kris Kowal's Q provides the fail() shorthand for defining error handlers.
Error handlers can then be defined as
promise.fail(function(error) { ... })
instead of
promise.then(null, function(error) { ... })
... which feels a bit clunky.
I realize that Angular's $q is meant to be minimal and without the bells and whistles of Q, so this might not be worth adding to Angulars $q implementation.
If you consider that fail()
would be feasible to include in Angular's $q, let me know and I will be happy to create a pull request with a patch!
Metadata
Metadata
Assignees
Labels
No labels