0Pricing
Vue Academy · Lesson

Nested and Dynamic Routes

Build nested layouts and dynamic route parameters.

Beyond Static Routes

Real apps need routes that carry data and nest within layouts.

  • Dynamic segments capture values like an id
  • Nested routes render children inside a parent
  • Named routes and programmatic navigation add flexibility

Dynamic Route Segments

A colon defines a dynamic segment that matches any value.

const routes = [
  { path: "/user/:id", component: UserProfile }
]

// Matches /user/1, /user/42, /user/abc

All lessons in this course

  1. Setting Up Vue Router
  2. Nested and Dynamic Routes
  3. Navigation Guards
← Back to Vue Academy