Skip to content

[FEATURE] Add "onRouteError" Hook #441

@roblav96

Description

@roblav96

I'm using vue heavily in my project My Convoy with the cordova native page transitions plugins.

Now when a route error happens, the screenshot to my intended transition stays on the screen thus freezing my app.

It would be nice if we could incorporate something like:

Router.onError( function ( trans, error ) {
    console.error( error )
    window.plugins.nativepagetransitions.cancelPendingTransition()
} )

Is this possible?

Currently I'm doing this:

window.onerror = function ( msg, url, line, column, err ) {
    window.plugins.spinnerDialog.hide()
    window.plugins.nativepagetransitions.cancelPendingTransition()
}

but it would be nice to have the Router method in case an error never occurred.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions