Open History to see the last commit
1import { createRouter, createWebHistory } from 'vue-router'
2import HomeView from './HomeView.vue'
3import FilmList from './FilmList.vue'
4import FilmDetail from './FilmDetail.vue'
5import CharacterList from './CharacterList.vue'
6import CharacterDetail from './CharacterDetail.vue'
7β
8export const router = createRouter({
9 history: createWebHistory(),
10 routes: [
11 { path: '/', component: HomeView },
12 { path: '/films', component: FilmList },
13 { path: '/films/:filmId', component: FilmDetail, props: true },
14 { path: '/characters', component: CharacterList },
15 {
16 path: '/characters/:characterId',
17 component: CharacterDetail,
18 props: true,
19 },
20 ],
21})