Client Hub Project
This commit is contained in:
41
ClientHub/Pages/FetchData.razor
Normal file
41
ClientHub/Pages/FetchData.razor
Normal file
@ -0,0 +1,41 @@
|
||||
@page "/fetchdata"
|
||||
|
||||
@using OI.Metrology.ClientHub.Data
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
||||
<p>This component demonstrates fetching data from a service.</p>
|
||||
|
||||
@if (_WeatherForecasts is null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (WeatherForecast weatherForecast in _WeatherForecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@weatherForecast.Date.ToShortDateString()</td>
|
||||
<td>@weatherForecast.TemperatureC</td>
|
||||
<td>@weatherForecast.TemperatureF</td>
|
||||
<td>@weatherForecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
Reference in New Issue
Block a user