jaime
jaime

Reputation: 2344

Blazor Server and multiple `@page "/"` routes - how is this resolved?

I created a .net6 blazor server application. I noticed that both _Host.cshtml and Index.razor contain a @page "/" directive.

How does blazor know which one to use? Clearly it is using the _Host.cshtml version, but why?

Upvotes: 1

Views: 637

Answers (1)

maciek
maciek

Reputation: 1109

Well, docs tell that this directive has different meaning depending wether it is used in *.cshtml file or Razor component.

Upvotes: 1

Related Questions