I have these routes setup:
Vue.use(Router)
export default new Router({
routes: [
{
path: '/group/:id',
name: 'Group',
component: GroupContainer,
children: [
{
// when /group/:id/posts is matched
path: 'posts',
component: ViewPosts
},
{
// when /group/:id/topics is matched
path: 'topics',
component: ViewTopics
},
{
// when /group/:id/people is matched
path: 'people',
component: ViewPeople
}
]
}
]
})
So the group component has a template with the router view here
<template>
<div class="group">
I am a group page
<router-view></router-view>
</div>
</template>
So the group component ends up being the parent to the ViewPosts, ViewTopics, or ViewPeople, but, it doesn't directly contain the components.
What is a good system to pass data from the parent (Group) to the children (ViewPosts...) and allow the children to emit up to the parent?