'Nuxt 3 Routing : "Simple" dynamic route return 404 error
I'm trying to make a simple dynamic link with nuxt3 ("3.0.0-rc.3") and I cannot reach dynamic slug url. I followed this page but it doesn't seem to work for me : https://nuxtjs.org/examples/routing/dynamic-pages
Here is my simple page structure :
pages/
index.vue
category/
_id.vue
When I try to reach my localhost:3000/category/test I have the 404 error page with the message "Page not found: /category/test".
Here is the link in my "index.vue" file :
<NuxtLink to="/category/test">Test</NuxtLink>
Here is the content of my "_id.vue" file :
<template>
<div>
<h1>Project: {{ $route }}</h1>
</div>
</template>
<script>
export default {}
</script>
<style>
</style>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
