vue-router: Passing props into components, when using named views
Yes, you can use multiple components and pass props to each one:
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
components: {
default: Home,
foo: Foo
},
props: {
default: { name: 'Home' },
foo: { name: 'Foo' }
}
}
]
})
http://jsfiddle.net/jonataswalker/ykf0uv0d/
See related discussion.