hn-dotnet/Apps/Client/Pages/Show.razor
2020-12-27 12:29:46 +01:00

24 lines
363 B
Plaintext

@page "/links/{id:guid}"
@inject LinksClient Links
@if (Item == null)
{
<p>Loading...</p>
}
else
{
<h1>Showing link @Item.Url with @Item.UpVotes / @Item.DownVotes</h1>
}
@code {
[Parameter]
public Guid Id { get; set; }
private LinkDto Item;
protected override async Task OnInitializedAsync()
{
Item = await Links.GetLinkByIdAsync(Id);
}
}