Open
Description
Currently the @page
directive must specify a route template. The route template must be enclosed in quotes and begin with the '/' character.
I need to be able to use a const string
as well.
Is your feature request related to a problem? Please describe.
I want to define my routes in a single place and then reuse them throughout the application, eliminating as many string literals as possible. Without this, refactoring and long-term maintenance becomes a nightmare of Find/Replace.
Describe the solution you'd like
Ideal:
@page @ClientRoutes.Members.ClinicalSupervision
Acceptable:
@page "@ClientRoutes.Members.ClinicalSupervision"
public static class ClientRoutes
{
public static class Members
{
public const string ClinicalSupervision = "/Members/ClinicalSupervision";
}
}
...
private void CancelAsync() => NavigationManager.NavigateTo(ClientRoutes.Members.ClinicalSupervision);
Activity