#Is there a way to cancel a navigation event in Route.beforeLoad?

6 messages · Page 1 of 1 (latest)

fiery dawn
#

Am building an Electron app, where we want some urls to open in a separate window. We would like to handle this on a router or route level instead of manually opening popup windows.

Trying to accomplish this by checking for specific urls in the root route beforeLoad method, but I can't find a way of cancelling the navigation event.

dusk shell
#

I don't think we have this right now. you could maybe workaround this by using a blocker?

#

can you please create a feature request as a GitHub discussion
describe your use case and how an API could look like. ideally also provide links to how other routers provide similar functionality

fiery dawn
#

Couldn't come up with a reliable way to use a blocker since blockers don't have access to the location

dusk shell
#

we have a PR for enhancing blockers, but this needs some work

#

if you want you can look into it