Comments (5)
The error page isn't a page/route and it is displayed no matter what page/route you are on. It does not support definePageMeta
.
What are you trying to achieve?
from nuxt.js.
I'm building admin template and levaraging error.vue
as my 404 page mainly. In my admin template, I have several route meta that allows you to customize the each route:
View my projects' route metas
Name | Description | Type |
---|---|---|
action? | CASL action for the route | string |
subject? | CASL subject for the route | string |
layoutWrapperClasses? | Adds class to the layout wrapper div | string |
navActiveLink? | Allow highlighting link which is not the active link in the navigation menu of the admin | RouteLocationRaw |
layout? | 'blank' | 'default' - you are aware of it | string |
redirectIfLoggedIn? | Redirect the user to the home page if this boolean is true (login & register pages) | boolean |
ATM, I want to:
- set layout to
blank
for 404 page (I can wrap the page withNuxtLayout
as per docs as a workaround) - set
action
for access control - set
subject
for access control
According to best of my knowledge nuxt uses error.vue
for 404 page, right?
from nuxt.js.
Yes, error.vue
is used for displaying errors. Like app.vue
, it's global and not specific to any page/route.
from nuxt.js.
You can trap the relevant route meta in a plugin and raise an error manually in case the route meta is βblankβ, It will open the 404 page automatically.
from nuxt.js.
Coming from Vue, I thought of error.vue
as a page but it's something else in nuxt. Closing this as this is how nuxt behaves.
from nuxt.js.
Related Issues (20)
- The CJS build of Vite's Node API is deprecated. HOT 2
- Big problem HOT 1
- Transform components imported by explicit import
- docs: improve testing component example to avoid auto import misunderstanding HOT 4
- During the development process, the error Last few GCs will be reported. HOT 1
- Infinite warn and memory crash when updating nuxt from 3.10 to 3.11 HOT 2
- nitro has memory leak when building with loglevel 3 but not loglevel 1 HOT 1
- Custom useFetch type error HOT 4
- Latest nuxt version delays the load of CSS on SSR HOT 3
- Cannot read documentation HOT 1
- showError doesn't trigger `app:error` (anymore?) HOT 1
- Nuxt Docs seem broken HOT 5
- ReportingObserver [deprecation]: Unload event listeners are deprecated and will be removed
- Suggest supporting React component import to compensate for the current deficiencies in the Vue ecosystem. HOT 1
- Clicking on NuxtLink with "#" as Value Triggers Loading of The Page HOT 1
- Is there any way to change the runtimeConfig attribute defined in nuxt.config.ts in the plugin in nuxt 3.6.5 version? HOT 1
- Hello, there is a duplicate item in the compilerOptions.paths in tsconfig.server.json, which includes "~/*": ["../*", "../*"] HOT 1
- nuxt provides a simplified version of the documentation HOT 1
- loading animation (spaLoadingTemplate) disappears before request fully loaded HOT 2
- Restore scrollposition flicks on browser back
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.