Skip to content

Instantly share code, notes, and snippets.

@pratheekhegde
Last active February 17, 2018 09:26
Show Gist options
  • Select an option

  • Save pratheekhegde/79d6eaf9882f55be65418986163fe8e7 to your computer and use it in GitHub Desktop.

Select an option

Save pratheekhegde/79d6eaf9882f55be65418986163fe8e7 to your computer and use it in GitHub Desktop.
const router = new Router({
routes: [
{
path: '/',
component: HelloWorld,
meta: {
breadCrumbs: [{
to: '/', // hyperlink
text: 'Hello World' // crumb text
}]
}
},
{
path: '/earth',
component: HelloEarth,
meta: {
breadCrumbs: [{
to: '/earth', // hyperlink
text: 'Earth' // crumb text
}]
},
children: [
{
path: 'moon',
component: HelloMoon,
meta: {
breadCrumb: [{
to: '/earth', // hyperlink
text: 'Earth' // crumb text
},
{
to: '/earth/moon', // hyperlink
text: 'Moon' // crumb text
}]
}
}
]
},
{
path: '/saturn',
component: HelloSaturn,
meta: {
breadCrumb: [{
to: '/saturn', // hyperlink
text: 'Saturn' // crumb text
}]
},
children: [
{
path: ':moon',
component: HelloSaturnMoon,
props: true
}
]
}
]
})
export default router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment