Sorry, there's nothing at this address.
11 |Current count: @currentCount
9 | 10 | 11 | 12 | @code { 13 | private int currentCount = 0; 14 | 15 | private void IncrementCount() 16 | { 17 | currentCount++; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Client/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | @attribute [Authorize(Roles = "Administrator")] 3 | @using BlazorWasmAuthenticationAndAuthorization.Client.Authentication 4 | @using BlazorWasmAuthenticationAndAuthorization.Shared 5 | @using System.Net.Http.Headers 6 | @inject HttpClient Http 7 | @inject AuthenticationStateProvider authenticationStateProvider 8 | @inject NavigationManager navManager 9 | 10 |This component demonstrates fetching data from the server.
15 | 16 | @if (forecasts == null) 17 | { 18 |Loading...
19 | } 20 | else 21 | { 22 |Date | 26 |Temp. (C) | 27 |Temp. (F) | 28 |Summary | 29 |
---|---|---|---|
@forecast.Date.ToShortDateString() | 36 |@forecast.TemperatureC | 37 |@forecast.TemperatureF | 38 |@forecast.Summary | 39 |