How do I access the appsettings in Blazor WebAssembly?

Configurations loaded by the Blazor WebAssembly can be accessed by injecting IConfiguration services. Using IConfiguration, the values from wwwroot/appsettings.json and wwwroot/appsettings.{ENVIRONMENT}.json files can be accessed. wwwroot/appsettings.json Index.razor More information about configuration can be found here.

How do I conditionally add Blazor components’ template?

The if statement is used to display a component or fragment conditionally. If the condition evaluates to true, the component will be loaded to the view. Whenever the properties used in the if statement changes, the condition evaluates to either true or false and adds or removes the component to the page. Refer to the following code sample.

How do I get/render the raw HTML from Blazor components?

In Blazor, you can render raw HTML from a component using the MarkupString type. The MarkupString type allows you to render HTML content directly without being sanitized or escaped by the framework.   Here’s how you can use MarkupString to render raw HTML in a Blazor component:  View Sample in GitHub