SO i want to navigate from one page to another. From a list of products to a edit product view. On my list page i have a link as follows.
<NavLink class="nav-link">
<span class="oi oi-list-rich" aria-hidden="true" id="@product.Id" @onclick="@(() => Navigate(product.Id))" style="cursor: pointer"></span> Edit @*FIX ME should link to edit product. Obviously...*@
</NavLink>
And the code is to navigate is:
void Navigate(long productId)
{
NavManager.NavigateTo("/editproduct/" + productId);
}
and i want to get to a page: @page "/editproduct/{id}"
In my opinion my code should work. Yet im getting a: Uncaught Error: System.ArgumentException: There is no event handler associated with this event.
when i click on my link. Any ideas how to fix this ?