Skip to content

Unhandled rejection when doing event.preventDefault() #3314

@rostislavprovodenko

Description

@rostislavprovodenko

Using ui-router 1.0.0 rc1 and stateEvents.js with angular 1.56.
Code:
$scope.$on('$stateChangeStart', (event) => event.preventDefault())
causes error messages to be written to console: 'TransactionRejection(type 3, message: The transition has been aborted, detail: Hook aborted transition)'. I have provided a custom error handler to $state.defaultErrorHandler() that ignores type 3 transition rejections. However, it'd be nice if the built in handler itself ignored type 3 errors.

Regards,
Rostislav.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions