Vue.js Router Tuts: Named Routes and Views


If you are new to vue-router, or to version 2 of Vue and vue-router, follow this guide to help you get started by completing the task of using Vue Router to display a list of users and load their respective posts.

Vue Router is pretty easy to use once you get the hang of it.

The author has prepared a repo on GitHub, which you should fork in order to start with this project.

The tutorial consists of five steps:

  • Step 1: Routes – main.js
  • Step 2: Layout.vue
  • Step 3: UserList.vue
  • Step 4: User.vue
  • Step 5: Posts.vue

Also, it presents some challenges for you to take, to improve the functionality of the app and help improve understanding of how the router works. Find router's documentantion which is pretty straightforward and can help you in the building process.

Find the tutorial here. By @patrickodacre