You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I need to pass props to a route, but to do it I need to use the name of the route, and the library modifies it.
I tried to use localeLocation, and when running it inside a template it works correctly.
My problem is that I need it to work inside the script block (I'm using vue3 with composition api, and the script setup syntax).
When using the function localeLocation inside the script, it tells me that it does not exist, when importing it (which I do not need to do when using it inside the template) and running the function it returns me that it cant find 'router', but I can not pass it to the function.
What can I do to be able to use parameters with this library?
My project is configured like the playground vue3 project
<script setup lang="ts">
// Does not work
console.log(localeLocation({ name: 'about', params: { test: 'hola' } } ))
</script>
<template>
<!-- Does work -->
<pre>{{ localeLocation({ name: 'about', params: { test: 'hola' } }) }}</pre>
</template>
The text was updated successfully, but these errors were encountered:
Hi! I need to pass props to a route, but to do it I need to use the name of the route, and the library modifies it.
I tried to use localeLocation, and when running it inside a template it works correctly.
My problem is that I need it to work inside the script block (I'm using vue3 with composition api, and the script setup syntax).
When using the function localeLocation inside the script, it tells me that it does not exist, when importing it (which I do not need to do when using it inside the template) and running the function it returns me that it cant find 'router', but I can not pass it to the function.
What can I do to be able to use parameters with this library?
My project is configured like the playground vue3 project
The text was updated successfully, but these errors were encountered: