@page "/fetchdata" @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Components.WebAssembly.Authentication @using Start.Shared @attribute [Authorize] @inject HttpClient Http
This component demonstrates fetching data from the server.
@if (forecasts == null) {Loading...
} else {Date | Temp. (C) | Temp. (F) | Summary |
---|---|---|---|
@forecast.Date.ToShortDateString() | @forecast.TemperatureC | @forecast.TemperatureF | @forecast.Summary |