{{ $route.params.slug }}
@@ -182,7 +186,7 @@ This file tree will generate these routes: ] ``` -To display the `child.vue` component, you have to insert the `I am the parent view
-{{ data }}+ +``` + +Note that [h3 utilities](https://github.com/unjs/h3#utilities) are auto-imported. + +:ReadMore{link="https://nitro.unjs.io/guide/routing" title="Nitro Route Handling Docs"} ## Server Routes Files inside the `~/server/api` are automatically prefixed with `/api` in their route. -For adding server routes without `/api` prefix, you can instead put them into `~/server/routes` directory. + +To add server routes without `/api` prefix, put them into `~/server/routes` directory. **Example:** @@ -43,6 +56,10 @@ export default defineEventHandler(() => 'Hello World!') Given the example above, the `/hello` route will be accessible at
Counter: {{ counter || '-' }}
@@ -31,14 +36,9 @@ The example below creates a cookie called `counter`. If the cookie doesn't existList
-{{ list }}- - -
List
+{{ list }}+ + +