Skip to content

Instantly share code, notes, and snippets.

@ShariqT
Created November 19, 2021 04:12
Show Gist options
  • Save ShariqT/72f6b3150141e2edb9944c6a8437a554 to your computer and use it in GitHub Desktop.
Save ShariqT/72f6b3150141e2edb9944c6a8437a554 to your computer and use it in GitHub Desktop.
Router
import { createWebHistory, createRouter } from "vue-router";
import ListTemplates from "../components/ListTemplates.vue";
import Front from "../components/Front.vue";
import CreatePostcard from "../components/CreatePostcard.vue"
const routes = [
{ path: "/", component: Front, name: "Home" },
{ path: "/list", component: ListTemplates, name: "ListTemplates" },
{ path: "/create", component: CreatePostcard, name: "CreatePostcard"}
];
const router = createRouter({
history: createWebHistory(),
routes,
});
export default router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment