I have a few of components mapped to several different routes, and I am wondering if the components created for each route are considered sibling components in terms of how data is passed around? It is unclear which component is the parent component in this structure:
PageOne = Vue.extend( {
template: "#page-one"
})
PageTwo = Vue.extend({
template: "#page-two"
})
Home = Vue.extend({
template: "#home"
})
var router = new VueRouter()
router.map({
'/': {
component: Home
},
'/PageOne': {
component: PageOne
},
'/PageTwo': {
component: PageTwo
}
})
var App = Vue.extend({})
router.start(App, "#app")
So if I want to pass data from the Home route to PageOne, would I need to use a global event bus, or could I use props to pass the data from one route to the next?
Here is a demo: http://codepen.io/p-adams/pen/kXwxRR