Menu
×
×
Correct!
Exercise:Routing in Vue is set up in the 'main.js' file. Fill the blanks below so that the route is created successfully.
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import FishTypes from './components/FishTypes.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ @(4): '/fish', @(9): FishTypes }
]
});
const app = createApp(App)
app.use(router);
app.mount('#app')
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import FishTypes from './components/FishTypes.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/fish', component: FishTypes }
]
});
const app = createApp(App)
app.use(router);
app.mount('#app')
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 54 exercises.
Are you sure you want to continue?