Skip to content

Instantly share code, notes, and snippets.

View nurdism's full-sized avatar
🥂
Lets make cool stuff!

Nurdism nurdism

🥂
Lets make cool stuff!
View GitHub Profile
@innocenzi
innocenzi / ExampleComponent.vue
Last active March 30, 2022 08:51
Inertia route guards
<template>
<!-- ... -->
</template>
<script>
export default {
// ...
beforeRouteLeave (vm, options, event) {
// vm will now refer to this component instead of the link
return window.confirm(vm.$trans('ticket.confirm_leave_creation'));