From 1d5616633306c0c0cad0914a7c6433988d5c8ea4 Mon Sep 17 00:00:00 2001 From: haerong22 Date: Mon, 1 Aug 2022 00:56:24 +0900 Subject: [PATCH] #14 simple blog : front - read view --- simpleblog/front/src/router/index.ts | 7 ++++++ simpleblog/front/src/views/HomeView.vue | 7 +++++- simpleblog/front/src/views/ReadView.vue | 29 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 simpleblog/front/src/views/ReadView.vue diff --git a/simpleblog/front/src/router/index.ts b/simpleblog/front/src/router/index.ts index 23508816..9e9c03c2 100644 --- a/simpleblog/front/src/router/index.ts +++ b/simpleblog/front/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from "vue-router"; import HomeView from "../views/HomeView.vue"; import WriteView from "../views/WriteView.vue"; +import ReadView from "../views/ReadView.vue"; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -14,6 +15,12 @@ const router = createRouter({ path: "/write", name: "write", component: WriteView, + }, + { + path: "/read/:postId", + name: "read", + component: ReadView, + props: true, } // { // path: "/about", diff --git a/simpleblog/front/src/views/HomeView.vue b/simpleblog/front/src/views/HomeView.vue index a35a6479..cb12382d 100644 --- a/simpleblog/front/src/views/HomeView.vue +++ b/simpleblog/front/src/views/HomeView.vue @@ -1,6 +1,9 @@ + + \ No newline at end of file