Given the Vue Router configuration below, what will the user see when navigating to /dashboard/settings?
const routes = [ { path: '/dashboard', component: DashboardLayout, children: [ { path: '', component: DashboardHome }, { path: 'settings', component: DashboardSettings } ] } ];
Think about how parent and child components render together in nested routes.
In Vue Router, the parent component (DashboardLayout) renders and inside it the child route component (DashboardSettings) is displayed where <router-view> is placed. So both appear.
Which option contains the correct syntax for defining nested routes in Vue Router?
const routes = [ { path: '/profile', component: ProfileLayout, children: [ { path: 'info', component: ProfileInfo }, { path: 'settings', component: ProfileSettings } ] } ];
Remember child paths should be relative, not absolute.
Child routes must have relative paths without a leading slash. Option B correctly uses 'info' as the path.
Consider a parent route with two nested child routes rendered in separate <router-view> elements. What will be displayed when navigating to /app/dashboard/overview?
const routes = [ { path: '/app', component: AppLayout, children: [ { path: 'dashboard', components: { default: DashboardMain, sidebar: DashboardSidebar }, children: [ { path: 'overview', component: DashboardOverview } ] } ] } ];
Think about named views and nested child routes inside components.
Named views render DashboardMain and DashboardSidebar inside AppLayout. DashboardOverview renders inside DashboardMain's
Given this route setup, the child component ChildView does not appear when navigating to /parent/child. What is the most likely cause?
const routes = [ { path: '/parent', component: ParentView, children: [ { path: 'child', component: ChildView } ] } ]; // ParentView.vue template: // <template><div>Parent Content</div></template>
Check how child routes render inside parent components.
For child routes to render, the parent component must include a
When multiple nested routes match a URL, how does Vue Router decide which components to render?
Think about how nested routes build up the page layout.
Vue Router renders matched routes hierarchically: parent components render first, then child components inside their