-
The Index.razor page in the Maui Blazor app uses an override to redirect to /discover using NavigationManager.Navigate. What is the relationship between the routes shared amongst the Maui Blazor app and the Razor Class Library? Having moved a Blazor app into a RCL I want the Maui Blazor app to open the route URL in the RCL, but this is not working. Nor is any attempt I have made to simplify tings by moving the RCL files into a separate /app folder. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To answer my own question, reading on Blazor Routing I learned of the AdditionalAssemblies attribute on the Router configuration in Main.Razor of the MAUI Blazor app (MobileBlazor). You can see this in MobileBlazor's Main.Razor. By referencing the Razor Class Library (web), routes from that assembly are now included in MAUI.
|
Beta Was this translation helpful? Give feedback.
To answer my own question, reading on Blazor Routing I learned of the AdditionalAssemblies attribute on the Router configuration in Main.Razor of the MAUI Blazor app (MobileBlazor).
You can see this in MobileBlazor's Main.Razor. By referencing the Razor Class Library (web), routes from that assembly are now included in MAUI.
<Router AppAssembly="@GetType().Assembly" AdditionalAssemblies="new[] { typeof(MainLayout).Assembly}">