Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4844

How can I overwrite a route in Blazor?

$
0
0

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?


Viewing all articles
Browse latest Browse all 4844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>