Guest User

Untitled

a guest
Feb 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import GameList from '@/components/pages/game/List.vue'
  4. import GameSingle from '@/components/pages/game/Single.vue'
  5. import RuleList from '@/components/pages/game/rule/List.vue'
  6. import RuleSingle from '@/components/pages/game/rule/Single.vue'
  7.  
  8. Vue.use(Router)
  9.  
  10. export default new Router({
  11. routes: [
  12. {
  13. path: '/',
  14. component: GameList
  15. },
  16. {
  17. path: '/game/:id',
  18. name: 'Game',
  19. component: GameSingle,
  20. children: [
  21. {
  22. path: 'rules',
  23. name: 'Game Rules',
  24. components: {
  25. page: RuleList
  26. },
  27. meta: {
  28. showModal: false
  29. }
  30. },
  31. {
  32. path: 'rules/:ruleId',
  33. name: 'Game Rule',
  34. components: {
  35. page: RuleList,
  36. rule: RuleSingle
  37. },
  38. meta: {
  39. showModal: true
  40. }
  41. }
  42. ]
  43. }
  44. ]
  45. })
Add Comment
Please, Sign In to add comment