Skip to content
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
@pelme

Description

@pelme

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions