Skip to content

Instantly share code, notes, and snippets.

@ramsaylanier
Created February 8, 2018 14:53
Show Gist options
  • Select an option

  • Save ramsaylanier/e98abc704cb9fb372a75f87f60f64616 to your computer and use it in GitHub Desktop.

Select an option

Save ramsaylanier/e98abc704cb9fb372a75f87f60f64616 to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import Router from 'vue-router'
import GameList from '@/components/pages/game/List.vue'
import GameSingle from '@/components/pages/game/Single.vue'
import RuleList from '@/components/pages/game/rule/List.vue'
import RuleSingle from '@/components/pages/game/rule/Single.vue'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
component: GameList
},
{
path: '/game/:id',
name: 'Game',
component: GameSingle,
children: [
{
path: 'rules',
name: 'Game Rules',
components: {
page: RuleList
},
meta: {
showModal: false
}
},
{
path: 'rules/:ruleId',
name: 'Game Rule',
components: {
page: RuleList,
rule: RuleSingle
},
meta: {
showModal: true
}
}
]
}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment