I have a View Component in _Layout.cshtml. My application has a route of /home/{id}. How can I get the id value in my URL route from the View Component controller?
public class LayoutViewComponent : ViewComponent
{
public async Task<IViewComponentResult> InvokeAsync()
{
//how do I get the value of {id} here?
return View();
}
}