How to do it…

Let's imagine that we have a fashion website and Lisa, the employee responsible for giving titles to dresses, creates two new links for two pieces of clothing:

<router-link to="/green-dress-01/">Valentino</router-link><router-link to="/green-purse-A2/">Prada</router-link>

The developers create the corresponding routes in the vue-router:

const router = new VueRouter({  routes: [    {      path: '/green-dress-01',      component: Valentino01    },    {      path: '/green-purse-A2',      component: PradaA2    }  ]})

Later, it is discovered that the two items are not green but red. Lisa is not to blame since she is color-blind.

You are now in charge of changing all the links to reflect the true color of the listing. The first thing you do is change the links ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.