After checking similar questions on stackoverflow without success, I am seeking a solution.
I am attempting to determine if a subroute is a child of a specific route in order to display a container. Unfortunately, the following code snippet does not work:
<div v-if="this.$route.matched.some(route => route.path === '/projects')">
etc.
</div>
My goal is to show the div container on both www.example.com/projects
and www.example.com/projects/foo
.
I have also attempted to remove the this
.
Any tips or guidance would be greatly appreciated!