How to acess the appsettings in blazor webassembly
Using ASP.NET Core 6.0 Blazor configuration. Blazor WebAssembly loads configuration from the following app settings files by default: wwwroot/appsettings.json. wwwroot/appsettings.{ENVIRONMENT}.json, where the {ENVIRONMENT} placeholder is the app’s runtime environment. Example: wwwroot/appsettings.json { “h1FontSize”: “50px” } Pages/ConfigurationExample.razor @page “/configuration-example” @using Microsoft.Extensions.Configuration @inject IConfiguration Configuration <h1 style=”font-size:@Configuration[“h1FontSize”]”> Configuration example </h1> Warning Configuration and settings files in a … Read more