|
|
@ -7,7 +7,13 @@ |
|
|
|
</p> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<p>data go here</p> |
|
|
|
<button v-on:click="test">Test</button> |
|
|
|
<h2>🚌 45</h2> |
|
|
|
<ul> |
|
|
|
<li v-for="arrival in bus" v-bind:key="arrival.trip"> |
|
|
|
{{ arrival.Direction }}, {{ arrival.late }} minutes late |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -18,7 +24,15 @@ export default { |
|
|
|
name: 'app', |
|
|
|
data: function () { |
|
|
|
return { |
|
|
|
now: new Date() |
|
|
|
now: new Date(), |
|
|
|
bus: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
test: function () { |
|
|
|
this.$http.get('/test_45_0.json').then(response => { |
|
|
|
this.bus = response.body.bus |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|