I need to detect parent route /products from inside of the FeaturedProducts.vue component. Which has a route path of /product-list/featured
const routes = [
{
path: "/",
name: "Home",
component: () => import('./Home.vue')
},
{
path: "/product-list",
name: "Products",
component: () => import('./Products.vue'),
children: [
{
path: '/featured',
name: "FeaturedProducts",
component: import('./FeaturedProducts.vue')
}
]
}];
How can I find the parent route programmatically in a component?