[Blazor] strongly defined page path and also default page path #41827
Labels
area-blazor
Includes: Blazor, Razor Components
feature-blazor-routing
Features related to routing in Blazor applications
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am trying to avoid typos in NavMenu component.
Currently, every page has @page "path"
The convention is "camelCase"
When using href in NavMenu, I could use nameof(TheBlazorPageClass) but that yields a PascalCase name. I have to use an extension function/helper method to get camelCase.
And on the page, I have to manually specify the path. There is no default.
Describe the solution you'd like
NavMenu
href
Additional context
No response
The text was updated successfully, but these errors were encountered: