nuxt error page
// layouts/error.vue
<template>
<div class="nuxt-error">
<component :is="errorPage" :error="error" />
</div>
</template>
<script>
import error404 from '~/components/error/404.vue';
import error500 from '~/components/error/500.vue';
export default {
name: 'nuxt-error',
layout: 'default', // optional
props: {
error: {
type: Object,
default: () => {},
},
},
computed: {
errorPage() {
if (this.error.statusCode === 404) {
return error404;
}
// catch everything else
return error500;
},
};
</script>
Also in JavaScript:
- string to char array javascript
- python dict into json string
- read keyboard reactjs
- how to show product count in jquery return response
- get a user input react
- bootstrap cdn for jquery
- setting multiple styles in javascript
- jquery direct window print pdf
- how to iterate object inside object in javascript
- expressjs cheat sheet
- adding dynamically add foreach elements as an array
- 00:00:00 / 00:00:00 js
- filter
- how could you implement javascript into java
- javascript change color
- variables 2 python .Bartolome sintes Marco
- js fill string with n characters
- react native passing params to nested navigators
- get the state of a checkbox
- javascript data structures
- angular new component
- box shadow javascript style change
- break string to array javascript without delimeter
- include other js files in a js file