|
|
@ -2,11 +2,11 @@ |
|
|
|
<div id="app"> |
|
|
|
<h1>Essen in Göttingen</h1> |
|
|
|
|
|
|
|
Wo? <select v-model="where" @click="updateRoute"> |
|
|
|
Wo? <select v-model="where"> |
|
|
|
<option v-for="mensa in mensen" :value="mensa.url">{{mensa.name}}</option> |
|
|
|
</select> |
|
|
|
|
|
|
|
Wann? <select v-model="when" @click="updateRoute"> |
|
|
|
Wann? <select v-model="when"> |
|
|
|
<option v-for="day in days" :value="day" :key="day">{{dayOfWeek[day]}}</option> |
|
|
|
</select> |
|
|
|
<router-view></router-view> |
|
|
@ -43,6 +43,10 @@ export default { |
|
|
|
when: '' + new Date().getDay() |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'where': 'updateRoute', |
|
|
|
'when': 'updateRoute' |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
updateRoute () { |
|
|
|
this.$router.push(`/${this.where}/${this.when}`) |
|
|
|