Advertisement
nothanksjeff

Untitled

Aug 8th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. // Instantiate router
  2. var router = new VueRouter({
  3. history: true,
  4. saveScrollPosition: true
  5. });
  6.  
  7. var itemFactory = require('./components/itemFactory.vue');
  8. console.log(itemFactory);
  9.  
  10. // Routes
  11. router.map({
  12. '/': {
  13. name: 'dashboard',
  14. component: require('./components/dashboard.vue')
  15. },
  16.  
  17. '/upgrade': {
  18. name: 'upgrade',
  19. component: require('./components/upgrade.vue')
  20. },
  21.  
  22. '/account': {
  23. name: 'account',
  24. component: require('./components/account.vue')
  25. },
  26.  
  27. '/billing': {
  28. name: 'billing',
  29. component: require('./components/billing.vue')
  30. },
  31.  
  32. '/users': {
  33. name: 'users',
  34. component: require('./components/users.vue')
  35. },
  36.  
  37. '/items/edit/:itemID': {
  38. name: 'editItems',
  39. component: Vue.extend({
  40. components: {itemFactory},
  41. template: "<itemFactory mode='edit'></itemFactory>"
  42. })
  43. },
  44.  
  45. '/items/create': {
  46. name: 'createItems',
  47. component: Vue.extend({
  48. components: {itemFactory},
  49. template: "<itemFactory mode='create'></itemFactory>"
  50. })
  51. },
  52.  
  53. '/items/details/:checkID': {
  54. name: 'itemDetails',
  55. component: require('./components/itemDetails.vue')
  56. }
  57. });
  58.  
  59. // Start!
  60. router.start(app, '#wrapper');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement