How to Separate Code From UI In Blazor.Net
Reference to this VisualStudioMagazine article, I am trying to have code in a separate file instead of razor view. I tried: @page "/Item" @using WebApplication1.Shared @using WebApplication1.Client.Services; @inject HttpClient Http @inherits ItemComponent @if (ItemList != null) { <table class="table"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Category</th> <th>Metal</th> <th>Price</th> <th>Quantity</th> </tr> </thead> <tbody> @foreach (var item in ItemList) { <tr> <td>@item.ID</td> <td>@item.Name</td> <td>@item.Category</td> <td>@item.Metal</td> <td>@item.Price</td> <td>@item.Quantity</td> <