I create a new page, e.g. in Pages/Clients/ subfolder with following code:
@page "/clients"@inject NavigationManager NavigationManager<div>My clients page</div>I put the link:
<NavLink href="/clients" class="nav-link">Clients</NavLink>When I click on link the page shows me default message
Sorry, there's nothing at this address.
Then I stop the app. Put my clients page in "Pages" folder. Run the application and I see the proper page with
My clients page
Ok, then I move my page file again to Pages/Clients/ subfolder, run the app and... it still works! Moreover - If I do any changes to Clients.razor page it is being shown correctly in browser.
So it looks like Blazor cannot find the page in subfolder for the first time, but after it "registers" it somehow it could find and show it correctly all the time.
I have the
<base href="~/" />line in my _Host.cshtml file