Using route function inside .vue components #635
-
I read all the discussions and comments, but I just can not find a solution to my problem. I use Ziggy version - 1.5.1, Laravel v.10.9.0, Inertia JS Vue 3 v.1.0.6. I don't use the In .vue components, calling the How can I solve this problem? Thank you. I am also attaching the code used. vite.config.js
app.js
Sample usage in Login.vue
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Inside See #588 (reply in thread) and #564 (comment). |
Beta Was this translation helpful? Give feedback.
Inside
setup()
or<script setup>
you have to retrieve the route function manually, in your case since you're using the Vue plugin you can just addconst route = inject('route');
and that'll work.See #588 (reply in thread) and #564 (comment).