Detect if a named router view is being used #1753
-
Hi all, I would like to know whether there's a way to find out if a named route view is being used. E.g. <main>
<RouterView name="Header" />
<RouterView name="Sidebar" />
<RouterView />
</main> In the above example, only some of the routes will include a Header and/or a Sidebar. What I'd like to be able to achieve is to apply a class to the I've had a look at the Any insight into this would be greatly appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should be able to find the name in the |
Beta Was this translation helpful? Give feedback.
You should be able to find the name in the
route.matched[i].components
object