Recall & Review
beginner Click to reveal answer
What is <RouterLink> used for in Vue?
<RouterLink> is a special component in Vue Router that creates clickable links to navigate between pages without reloading the whole app.
beginner Click to reveal answer
How do you specify the target route in <RouterLink>?
You use the
to attribute with a string path or an object describing the route to tell <RouterLink> where to go.beginner Click to reveal answer
What happens when you click a <RouterLink> in a Vue app?
Clicking a <RouterLink> changes the URL and shows the new page component without reloading the browser, making navigation fast and smooth.
intermediate Click to reveal answer
How can you style an active <RouterLink>?
Vue Router adds a CSS class like <code>router-link-active</code> to the active link, so you can style it differently with CSS.intermediate Click to reveal answer
Can <RouterLink> be used with dynamic route parameters?
Yes! You can pass an object to
to with name and params to navigate to routes with dynamic parts.What attribute do you use to set the destination in <RouterLink>?
✗ Incorrect
The where to navigate.
to attribute tells What does <RouterLink> do differently than a normal <a> tag?
✗ Incorrect
How can you style the currently active <RouterLink>?
✗ Incorrect
Vue Router adds
router-link-active class to active links for styling.Which of these is a valid way to use <RouterLink>?
✗ Incorrect
The .
to attribute is correct for How do you pass parameters to a dynamic route with <RouterLink>?
✗ Incorrect
Passing an object with
name and params is the correct way.Explain how helps with navigation in a Vue app.
Think about how clicking a link changes the page smoothly.
You got /5 concepts.
Describe how to use with dynamic route parameters.
Focus on how to tell Vue Router which dynamic page to show.
You got /4 concepts.
