diff --git a/Pages/Counter.razor b/Pages/Counter.razor index ef23cb3..9a60f37 100644 --- a/Pages/Counter.razor +++ b/Pages/Counter.razor @@ -10,7 +10,7 @@ @code { private int currentCount = 0; - + private void IncrementCount() { currentCount++; diff --git a/Program.cs b/Program.cs index 6f53b1b..d1c70e0 100644 --- a/Program.cs +++ b/Program.cs @@ -6,6 +6,8 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); + + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); -await builder.Build().RunAsync(); +await builder.Build().RunAsync(); \ No newline at end of file diff --git a/Shared/NavMenu.razor b/Shared/NavMenu.razor index 06a6830..e0757f9 100644 --- a/Shared/NavMenu.razor +++ b/Shared/NavMenu.razor @@ -1,6 +1,10 @@