commit
440aae1657
6 changed files with 61 additions and 2 deletions
@ -0,0 +1,27 @@ |
||||
import Vue from 'vue' |
||||
import VueRouter from 'vue-router' |
||||
import Home from '../views/Home.vue' |
||||
import posts from '../views/posts.vue' |
||||
|
||||
Vue.use(VueRouter) |
||||
|
||||
const routes = [ |
||||
{ |
||||
path: "/", |
||||
name: "Home", |
||||
component: Home, |
||||
}, |
||||
{ |
||||
path: "/posts", |
||||
name: "Posts", |
||||
component: posts, |
||||
}, |
||||
] |
||||
|
||||
const router = new VueRouter({ |
||||
mode: "history", |
||||
base: process.env.BASE_URL, |
||||
routes, |
||||
}) |
||||
|
||||
export default router |
@ -0,0 +1,19 @@ |
||||
<template> |
||||
<div id="home"> |
||||
<h1>Home</h1> |
||||
<aboutme/> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import aboutme from '@/components/aboutme' |
||||
|
||||
export default { |
||||
name: "Home", |
||||
components: { |
||||
aboutme |
||||
}, |
||||
} |
||||
</script> |
||||
|
||||
<style scoped></style> |
Loading…
Reference in new issue