summaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-05-11 21:04:42 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 16:59:20 +0100
commitb18ac8b055af1def5f52fc25950d9a14a58212cc (patch)
tree965276489ef1a67912577efcfa7bba192ddce281 /src/index.js
parent2f225a54054ae44df2d8fa691efcf247a82f94a1 (diff)
downloadbrokentalents-b18ac8b055af1def5f52fc25950d9a14a58212cc.tar.gz
brokentalents-b18ac8b055af1def5f52fc25950d9a14a58212cc.zip
sync tab selection with URL
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 8f584ce..3b3839d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,12 +1,31 @@
import Vue from 'vue';
+import VueRouter from 'vue-router';
import Buefy from 'buefy'
import 'buefy/lib/buefy.css'
import App from './App.vue';
+import Home from './Home.vue';
+import ReportService from './report-service.js';
+
+Vue.use(VueRouter);
Vue.use(Buefy);
+const reportService = new ReportService();
+
+const router = new VueRouter({
+ routes: [ {
+ path: '/',
+ name: 'home',
+ component: Home,
+ props: (route) => ({
+ reportService,
+ }),
+ } ]
+});
+
new Vue({
+ router,
el: '#app',
- render: h => h(App)
+ render: h => h(App),
});