Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

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