DEV Community

Discussion on: Vue Router Architecture and Nested Routes

Collapse
maciejjanyska profile image
Maciej Janyska • Edited

The idea is pretty damn cool. Unfortunately my menu is rendered by $router.options.routes so when it encounter EmptyRouterView (which has no name and this is necessary to set a link) the menu stops working. Maybe I missed something...

Collapse
berniwittmann profile image
Bernhard Wittmann Author

Yes that's right for your special use case. But you could utilize meta data in the route configuration, to control whether a route should be visible in the menu, and also have stuff like navigation names etc. there.
The comment above yours with the breadcrumbs has kind of the same problematic, which can also be solved be meta data. And it makes no difference whether you use a breadcrumb navigation or your app's menu :) Hope that helps ;)