So I have for example this route in my routes:
{ name: 'user', path: '/user/:id', component: User, props: { default: true, sidebar: false }, meta: { showFooter: false, title: `Viewing User ${route.params.id}` } }
I'm essentially wanting to access the id parameter of the URL, to set the title of the page, but I do not want to do it via the component.
Using ${route.params.id} returns undefined, is there an object I can access that will give me the same result? I'm relatively new to Vue and Vue-router, so unsure if this is possible or not.
Maybe I should be setting this in the component, and if so I'm happy to learn why this is the better way to do it :)