2.2.0
https://github.com/gomonk3037/vue-chalkack
Before
export default [
{
path: '/home',
meta: { requiresAuth: true },
name: 'UserPage',
component: UserPage,
},
];
Current
export default [
{
path: '/home',
meta: { requiresAuth: true },
component: UserPage,
children: [
{
path: '',
name: 'UserPage',
component: MainPage,
},
],
},
];
Children inherit meta value of the parent router object
meta object empty in '/home' route & children route
Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.
Sharing your whole project as the repo is just too much... If you manage to boil it down in a jsfiddle, I can take a look
@posva
I'm sorry I uploaded the wrong issue because I did not know it was really a bug.
'/foo' click => console log shows that the meta object for the route object is empty
https://jsfiddle.net/jm84numq/2/
I think this is by design, not a bug - although a way to access the parent route from beforeEach would be really nice.
Yeah, it's by design. Inheriting meta fields can be problematic. To get access to the meta fields of the parent, you have to look at the matched property