It seems that when I’m using the import statement in the <script setup> all code below it stops working. I installed the @heroicons package and use the import statement to use it as a component in my <template>. But everything below the import statements does not work anymore. My code: When running the code above I do not see “username”
Tag: nuxtjs3
How to pass params in Nuxt 3 server/api?
I can’t figure it out how to pass params to an anonymous function in Nuxt 3. index.vue: server/api/sign_up_news.js: working: Do you know how to pass parameter into Nuxt 3 server/api? Or do you got a source? The official docs are blank at this moment. Answer Use useBody Its mention in the docs: https://v3.nuxtjs.org/guide/features/server-routes#handling-requests-with-body you just need to read through
How to get route url params in a page in Nuxt2 and 3?
I am using Nuxt.js, and have a dymanic page which is defined under So, when I visit the page url, say, http://localhost:3000/post/hello-world, how can I read this slug parameter value inside my page. Currently I am geting it using asyncData as follows: This is working fine, but I think this is not the best way, and there should be a