Hello
I am using vue router and I put everything in one container. The container would have the data/updated data and sharing that with the children pages however I don't know how I should do that. I have already headache in these 2 weeks but not much luck so far.
My router looks like this:
const routes = [
{
path: '/',
redirect: '/dashboard',
name: 'Home',
component: TheContainer,
children: [
{
path: 'dashboard',
name: 'Dashboard',
component: Dashboard
},
{
path: 'information',
redirect: '/information/test2info',
name: 'Information',
component: {
render (c) { return c('router-view') }
},
children: [
{
path: 'test2nfo',
name: 'Test Information',
component: Test2Info
},
{
path: 'testinfo',
name: 'Test Information',
component: Test3
}
]
},
]
}
]
How I can share the data with children and if I update the data then it will be show in the children too?
Thanks in advance the answers.