mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
31 lines
859 B
HTML
31 lines
859 B
HTML
<template>
|
|
<div>
|
|
<h1>Weather forecast</h1>
|
|
|
|
<p>This component demonstrates fetching data from the server.</p>
|
|
|
|
<table v-if="forecasts.length" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Temp. (C)</th>
|
|
<th>Temp. (F)</th>
|
|
<th>Summary</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="item in forecasts">
|
|
<td>{{ item.dateFormatted }}</td>
|
|
<td>{{ item.temperatureC }}</td>
|
|
<td>{{ item.temperatureF }}</td>
|
|
<td>{{ item.summary }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p v-else><em>Loading...</em></p>
|
|
</div>
|
|
</template>
|
|
|
|
<script src="./fetchdata.ts"></script>
|