I was wondering if there is an option to prefix the route of razor pages inside a razor class library?
I want to create a blazor application which includes other modules each module should also have their own rcl, now i was looking if i could prefix all the pages inside a razor class library without the need to manually change all the @page "" routes by myself.
once you run the blazor application you go to localhost:5000 from their you can go to localhost:5000/Customers from here you are in de customers module if you want to go to details the url should be localhost:5000/Customers/Details/1 for example
so the @page in details is set to @page "Customers/Details/{id}" is their a possibility that Customers is always included for pages in this rcl?


I am not sure there is a way how to achieve that without a change, but there is a way how to do it clean:
Instead of
@page "/Customers/Details/{Id}"you can use @attribute [Route("/Customers/Details/{Id}")], which also means you can use string interpolation: