mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 15:48:27 -05:00
more basics
This commit is contained in:
@@ -7,32 +7,21 @@ import App from './Tandoor.vue'
|
||||
|
||||
import 'vite/modulepreload-polyfill';
|
||||
import vuetify from "@/vuetify";
|
||||
import test1 from "@/components/test1.vue";
|
||||
import test2 from "@/components/test2.vue";
|
||||
import ShoppingListPage from "@/pages/ShoppingListPage.vue";
|
||||
import RecipeSearchPage from "@/pages/RecipeSearchPage.vue";
|
||||
|
||||
// 1. Define route components.
|
||||
// These can be imported from other files
|
||||
|
||||
|
||||
// 2. Define some routes
|
||||
// Each route should map to a component.
|
||||
// We'll talk about nested routes later.
|
||||
const routes = [
|
||||
{path: '/', component: test1},
|
||||
{path: '/about', component: test2},
|
||||
{path: '/', component: RecipeSearchPage},
|
||||
{path: '/about', component: ShoppingListPage},
|
||||
]
|
||||
|
||||
// 3. Create the router instance and pass the `routes` option
|
||||
// You can pass in additional options here, but let's
|
||||
// keep it simple for now.
|
||||
const router = createRouter({
|
||||
// 4. Provide the history implementation to use. We
|
||||
// are using the hash history for simplicity here.
|
||||
history: createWebHashHistory(),
|
||||
routes, // short for `routes: routes`
|
||||
routes,
|
||||
})
|
||||
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(createPinia())
|
||||
|
||||
Reference in New Issue
Block a user