-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
What problem does this feature solve?
I have the following router configuration:
{
path: '/home',
components: {
default: HomePage,
leftSidebar: DefaultLeftSidebar
},
children: [
{
path: 'emails',
component: UserEmailsSubscriptions
},
{
path: 'profile',
components: {
default: UserProfile,
leftSidebar: UserProfileLeftSidebar, // not possible
}
}
]
}
As you can see, on route /home
I use a named view for the left sidebar. I need to replace this sidebar with UserProfileLeftSidebar
on /home/profile
route. However, this not possible because leftSidebar
named view is defined in the parent view.
I think that this a pretty common use case that you have a navigation bar or sidebar that needs to be replaced or modified on some router paths.
I would be very glad if someone could share a solution how to implement a dynamic sidebar or navigation bar using vue-router.
What does the proposed API look like?
The API could look like in the example above. However, it requires that every named view must have globally unique name.
joeSaad and TriPhoenix
Metadata
Metadata
Assignees
Labels
No labels