diff --git a/src/components/PageNotFound.vue b/src/components/PageNotFound.vue new file mode 100644 index 00000000..e7530835 --- /dev/null +++ b/src/components/PageNotFound.vue @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/src/router.js b/src/router.js index ac1bf072..09298e78 100644 --- a/src/router.js +++ b/src/router.js @@ -6,7 +6,7 @@ Vue.use(VueRouter) const Home = () => import('@/components/Home') const Person = () => import('@/components/Person') - +const PageNotFound = () => import('@/components/PageNotFound') // Export a new Vue Router instance to be used in the application. export default new VueRouter({ routes: [ @@ -17,6 +17,10 @@ export default new VueRouter({ { path: '/people/:id', component: Vue.component('Person', Person) + }, + { + path: '*', + component: Vue.component('PageNotFound', PageNotFound) } ] })