From abcc91ca81220ee45df8547f7e895835945c0fe0 Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Sat, 25 Apr 2020 14:41:00 +0200 Subject: [PATCH] Add route to Post view --- client/src/router/index.js | 7 +++++++ client/src/views/Posts.vue | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/router/index.js b/client/src/router/index.js index a83440c..7594860 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -2,6 +2,7 @@ import Vue from 'vue' import VueRouter from 'vue-router' import Home from '../views/Home.vue' import Posts from '../views/Posts.vue' +import Post from '../views/Post.vue' import QAPage from '../views/QAPage' Vue.use(VueRouter) @@ -17,6 +18,12 @@ const routes = [ name: "Posts", component: Posts, }, + { + path: "/posts/:id", + name: "Post", + component: Post, + props: true, + }, { path: "/qa", name: "QA", diff --git a/client/src/views/Posts.vue b/client/src/views/Posts.vue index 22a5468..b46ce22 100644 --- a/client/src/views/Posts.vue +++ b/client/src/views/Posts.vue @@ -5,7 +5,8 @@