dynamic routing1 VueRouter의 Dynamic Routing 파헤치기 Adding routes동적 라우팅 에서는 주로 두가지의 메서드로 인해 동작하게 됩니다.router.addRoute()router.removeRoute()새 경로만 등록하기 때문에, 페이지 이동시에는 router.push() 또는 router.replace()메서드를 사용해야 합니다.const router = coreateRouter({ history: createWebHistory(), routes: [{ path: '/:articleName', component: Article}],}) 위와 같은 경우 /about, /store, /3-twinkle 등 모든 라우트가 Article 컴포넌트를 렌더링 할 것입니다. 이제 새로운 /about이란 라우트를 추가해 보겠습니다.router.addRo.. FrameWorks/Vue 2024. 8. 3. 이전 1 다음 💲 추천 글 728x90 반응형