added settings for router

This commit is contained in:
Kostya
2023-11-12 22:04:09 +03:00
parent 0c9333f5a5
commit 45b5015a89
3 changed files with 15 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="app"> <div class="app">
<router-view></router-view>
</div> </div>
</template> </template>

View File

@@ -1,4 +1,9 @@
import { createApp } from 'vue' import { createApp } from 'vue'
import App from './App.vue' import App from './App.vue'
createApp(App).mount('#app') import router from "@/router/router";
const app = createApp(App)
app.use(router)
app.mount('#app')

View File

@@ -0,0 +1,8 @@
import { createRouter, createWebHistory } from "vue-router";
export default createRouter({
history: createWebHistory(),
routes: [
{ path: '/', component: HomePage, name: 'home' }
]
})