Comments (7)
error.vue
is only work on 1 level route, ex: /foo
.
In multiple level route, the default page will display instead of the error.vue
, ex: /foo/bar
.
If I use function error({ statusCode: 404, message: 'Page not found' })
, error.vue
is not working too.
from nuxt.js.
Hi, that's right it not on the documentation yet but will comes soon but it's possible.
You need to create a /pages/_error.vue file.
There is an example here on how we use it on nuxtjs.org.
from nuxt.js.
Which probably refer's to this now: https://github.com/nuxt/nuxtjs.org/blob/3d1d3d02616283b3001e638b44c8b99a2ad4a23f/layouts/error.vue
from nuxt.js.
Is it possible to somehow change the value of title meta tag on error page?
from nuxt.js.
I'm using nuxt 1.1.1
and the following snippet does not work for me in error.vue. It works in other pages however.
head () {
return {
title: 'Error 404'
};
}
from nuxt.js.
@jamesAtcodeninja probably no such hook in the error case, since it's a minimal setup.
(What if whatever caused the error runs when trying to render a page displaying the error)
from nuxt.js.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from nuxt.js.
Related Issues (20)
- nuxt 3.6.5 generate HOT 6
- `useSeoMeta` does not use `useHead` title template HOT 3
- Detect if in CSR or SSR HOT 7
- [request error] [unhandled] [500] fetch failed HOT 1
- Unable to deploy project with nuxt layers on vercel, works locally. HOT 1
- import.meta.server is undefined HOT 3
- <NuxtPage />Component affects useFetch secondary requests to the interface HOT 1
- Hydration node mismatch - but client and server is the same HOT 8
- 建议为Nuxt.js开发文档添加中文版本(Suggestion to Add a Chinese Version for Nuxt.js Documentation) HOT 4
- In dev, request header `x-forwarded-for` value is written as `::1` from only client side data fetching
- Duplicate stylesheet in dev when using Nuxt Layer
- app/router.options.ts HOT 3
- wrong route paths generated with files with special characters
- routeRules prerender not work HOT 6
- scrollBehaviour plugin doesn't react on route changes anymore (after upgrading to Nuxt 6.5) HOT 1
- A way to make payload reducers/revivers to apply recursively HOT 2
- Dynamic attributes are not rendered correctly on Firefox after page refresh HOT 7
- Can't modify useState composable in middleware HOT 1
- Missing loading Indicator when navigating to nested page HOT 1
- Allow setting the layout dynamically without using NuxtLayout within pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.