How can I overwrite a route in Blazor?

Viewed 736

I use a second assembly in my Blazor project. Works fine. But both assemblies have a page which is responsible for "/" route. A common index page in the referenced common library and a customized index page in the starting razor app. How can I tell the starting App that "/" should be only served by the page located in its own assembly?

App Code of custom assembly:

<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(Common.Server.Program).Assembly } ">

I get the following error:

An unhandled exception occurred while processing the request. InvalidOperationException: The following routes are ambiguous: '/' in 'Specific.Server.Pages.Index' '/' in 'Common.Server.Pages.Index'

Which makes totally sense but how can I handle it?

0 Answers
Related