How to manually add routes in blazor?
i have an applications with a bunch of plugins and sub assemblies that create pages.
We are migrating from WPF and creating some new features also.
These pages have characteristics that can be automated so importing the assembly to routing should not be done, because mainly some may even conflict.
So i would like to route them manually and i can add a route to any component, but not integrated in the app:
- add a page, it loads only the page
- add the layout, it does not load the page
- add the app says route not found
WebServer.MapGet("/lm", () => new RazorComponentResult<Page>());
WebServer.MapGet("/lm2", () => new RazorComponentResult<Layout>());
WebServer.MapGet("/lm3", () =>
{
RazorComponentResult rr = new RazorComponentResult<WebApp>();
return rr;
}
);