How to use vue-router params
Since you want to pass params to the component of the respective route you route object’s path property should have a dynamic segment denoted by : followed by the name of the key in your params object so your routes should be routes: [ {path: ‘/newLocation/:foo’, name: ‘newLocation’, component: newComponent} ] Then for programmatically navigating … Read more