0Pricing
Vue Academy · Lesson

Setting Up Vue Router

Install Vue Router and define your first routes.

What Is Vue Router?

Vue Router is the official routing library for Vue.

  • Maps URLs to components
  • Enables single-page navigation without full page reloads
  • Manages history, links, and parameters

Installing Vue Router

Add Vue Router to your project with npm.

# Install Vue Router 4 (for Vue 3)
npm install vue-router

# Or have it added during npm create vue@latest

All lessons in this course

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