Created
December 16, 2022 03:31
-
-
Save huanlin/949d79abf872fab0206bddba3f2cc4af to your computer and use it in GitHub Desktop.
Blazor entry point (Main method)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BlazorApp.Client; | |
using Microsoft.AspNetCore.Components.Web; | |
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | |
var builder = WebAssemblyHostBuilder.CreateDefault(args); | |
builder.RootComponents.Add<App>("#app"); | |
builder.RootComponents.Add<HeadOutlet>("head::after"); | |
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | |
await builder.Build().RunAsync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment