-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
41 lines (38 loc) · 1.42 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const Home = { template: '#home-template' }
const Committees = { template: '#committees-template', props: ['committees'] }
const CommitteesCentral = { template: '#committeesCentral-template', props: ['committeesCentral'] }
const Events = { template: '#events-template', props: ['events'] }
const Internal = { template: '#internal-template', props: ['internal'] }
const Services = { template: '#services-template', props: ['services'] }
const router = new VueRouter({
mode: 'hash',
base: '',
routes: [
{ path: '/', component: Home },
{ path: '/committees', component: Committees, props: true },
{ path: '/committeesCentral', component: CommitteesCentral, props: true },
{ path: '/events', component: Events, props: true },
{ path: '/internal', component: Internal, props: true },
{ path: '/services', component: Services, props: true }
]
});
var app = new Vue({
router,
data: {
committees: [],
committeesCentral: [],
events: [],
internal: [],
services: [],
}
}).$mount('#app');
request = new Request("ansprechpersonen.json", {credentials: 'include'});
fetch(request)
.then(response => response.json())
.then(function(ansprechpersonen) {
app.committees = ansprechpersonen.committees;
app.committeesCentral = ansprechpersonen.committeesCentral;
app.events = ansprechpersonen.events;
app.internal = ansprechpersonen.internal;
app.services = ansprechpersonen.services;
})