fix render mode of api test

main
Peace 11 months ago
parent 949d2061d2
commit 9fc9189ec5
  1. 5
      MyBlazorApp/Components/Pages/Weather.razor

@ -1,6 +1,7 @@
@page "/weather" @page "/weather"
@using MyBlazorApp.Services @using MyBlazorApp.Services
@inject WeatherForecastService ForecastService @inject WeatherForecastService ForecastService
@rendermode InteractiveServer
<h3>Weather Forecast ☀</h3> <h3>Weather Forecast ☀</h3>
@ -45,9 +46,9 @@ else
private IEnumerable<WeatherForecast> forecasts; private IEnumerable<WeatherForecast> forecasts;
private bool isLoading = true; private bool isLoading = true;
protected override async Task OnInitializedAsync() protected override void OnInitialized()
{ {
await LoadForecasts(); LoadForecasts();
} }
private async Task LoadForecasts() private async Task LoadForecasts()

Loading…
Cancel
Save