Created
February 8, 2018 14:53
-
-
Save ramsaylanier/e98abc704cb9fb372a75f87f60f64616 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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