Define router with routes for Home and posts

master
Raymonzut 5 years ago
parent ec30b39ffb
commit fd4206b989
No known key found for this signature in database
GPG Key ID: 97CF2D8BE2C69FC7
  1. 27
      client/src/router/index.js

@ -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
Loading…
Cancel
Save