Skip to content

Commit ca719a2

Browse files
Merge pull request #4 from kingscode/created-page-not-found
Created page not found
2 parents a0ea3af + 1211cdb commit ca719a2

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<div class="text-xs-center">
3+
<h1>
4+
Pagina niet gevonden
5+
</h1>
6+
<div class="my-5 title">De pagina die u probeert te bereiken is niet gevonden</div>
7+
<v-btn color="primary" @click="home">Terug naar de startpagina</v-btn>
8+
</div>
9+
</template>
10+
11+
<script>
12+
13+
export default {
14+
name: 'page-not-found',
15+
data() {
16+
return {};
17+
},
18+
methods: {
19+
home() {
20+
this.$router.push({name: 'home'});
21+
}
22+
},
23+
};
24+
</script>
25+
26+
<style scoped lang="scss">
27+
28+
</style>

generator/templates/Default/src/router.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ export default new Router({
7171
component: () => import('./views/UserResource.vue')
7272
},
7373
<%_ } _%>
74-
74+
{
75+
path: '/404',
76+
name: '404',
77+
component: () => import('./views/PageNotFound.vue'),
78+
},
79+
{
80+
path: '*',
81+
redirect: '/404'
82+
},
7583
],
7684
});

0 commit comments

Comments
 (0)