Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Parameters are not being passed in Blazor WebAssembly when hosted in Blazor Server because Blazor WebAssembly and Blazor Server are two different hosting models with different architectures.

Blazor WebAssembly is a client-side architecture where the application is downloaded and executed in the browser. The Blazor component is loaded in the browser and all the parameters are passed to it during the initialization.

On the other hand, Blazor Server is a server-side architecture where the application is executed on the server and the UI is updated on the client-side via SignalR. In this case, the component runs on the server and the parameter values are sent to the server over SignalR. The server then updates the component and sends the updated UI to the client via SignalR.

Therefore, when you host Blazor WebAssembly inside Blazor Server, the parameter values are not passed to the component during initialization as they are in Blazor WebAssembly. Instead, they are passed to the server over SignalR, which then updates the component and sends the updated UI to the client.