WebAssembly take advantage of it.</p>
<p>To illustrate how dependency injection works, start with the following simple example:</p>
<pre class="code" language="razor">@using Microsoft.Extensions.Logging

@inject ILogger&lt;HelloWorld&gt; Logger

&lt;h2&gt;Hello World!&lt;/h2&gt;

@code {
    protected override void OnInitialized()
    {
        Logger.LogInformation("Dependency Injection is wonderful!");
    }
}</pre>
<p>You will need to use the <code>@inject</code> to inject classes from Blazor WebAssembly