Taladan
Taladan

Reputation: 489

Blazor - start to specific subpage

I want to start in debug mode on a specific component.

I build a subpage named dashboard.

I write to the debug settings of my project at Browser start: http://localhost:[port]/dashboard. The browser opens with the argument. But the specific subpage was not loaded. The index page is still loaded.

Does anyone have any idea why? The base URL seems to have changed to http://localhost:[port]/dashboard. If I open another page, then the URL says e.g. http://localhost:[port]/dashboard/counter

The normal way of navigation is to display the page correctly.

Upvotes: 1

Views: 1184

Answers (1)

Edward
Edward

Reputation: 30056

You are changing the wrong url.

For changing Debug -> Web Server Settings-> App URL to http://localhost:[port]/dashboard, it will change the base url for the app which means all your routes are based on this path.

For your scenario, it seems you only want the web browswer to open http://localhost:[port]/dashboard when you debug, if so, you need to change Debug -> Launch browser-> http://localhost:[port]/dashboard

Upvotes: 1

Related Questions