diff --git a/src/TryMudBlazor.Client/App.razor b/src/TryMudBlazor.Client/App.razor index 36693d37..f3a0f11b 100644 --- a/src/TryMudBlazor.Client/App.razor +++ b/src/TryMudBlazor.Client/App.razor @@ -1,5 +1,6 @@ + AdditionalAssemblies="@(new List { typeof(Try.UserComponents.__Main).Assembly })" + @rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)"> @@ -9,3 +10,4 @@ +@* *@ \ No newline at end of file diff --git a/src/TryMudBlazor.Client/Pages/Index/Index.razor b/src/TryMudBlazor.Client/Pages/Index/Index.razor index 5d9d4c40..9a7be3a6 100644 --- a/src/TryMudBlazor.Client/Pages/Index/Index.razor +++ b/src/TryMudBlazor.Client/Pages/Index/Index.razor @@ -1,12 +1,11 @@ @page "/" -
TryMudBlazor
- MudBlazor - Source Code + MudBlazor + Source Code
@@ -152,8 +151,6 @@
- - @code { string Version { get { var v = typeof(MudText).Assembly.GetName().Version; return $"v{v.Major}.{v.Minor}.{v.Build}"; } } } \ No newline at end of file diff --git a/src/TryMudBlazor.Client/Program.cs b/src/TryMudBlazor.Client/Program.cs index 4be6441b..748f1764 100644 --- a/src/TryMudBlazor.Client/Program.cs +++ b/src/TryMudBlazor.Client/Program.cs @@ -20,13 +20,13 @@ namespace TryMudBlazor.Client using Microsoft.AspNetCore.Components.WebAssembly.Services; using Microsoft.AspNetCore.Components.Web; - public class Program + public static class Program { public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); - builder.RootComponents.Add("head::after"); + //builder.RootComponents.Add("head::after"); builder.Services.AddSingleton(serviceProvider => (IJSInProcessRuntime)serviceProvider.GetRequiredService()); builder.Services.AddSingleton(serviceProvider => (IJSUnmarshalledRuntime)serviceProvider.GetRequiredService()); diff --git a/src/TryMudBlazor.Client/Routes.razor b/src/TryMudBlazor.Client/Routes.razor deleted file mode 100644 index 302d9d85..00000000 --- a/src/TryMudBlazor.Client/Routes.razor +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/TryMudBlazor.Server/Program.cs b/src/TryMudBlazor.Server/Program.cs index fceb7fe8..28f36e70 100644 --- a/src/TryMudBlazor.Server/Program.cs +++ b/src/TryMudBlazor.Server/Program.cs @@ -1,12 +1,13 @@ +using Microsoft.AspNetCore.Builder; using MudBlazor.Examples.Data; using TryMudBlazor.Client; using TryMudBlazor.Client.Shared; var builder = WebApplication.CreateBuilder(args); -// Add services to the container. builder.Services.AddRazorComponents() - .AddInteractiveServerComponents(); + //.AddInteractiveServerComponents() + .AddInteractiveWebAssemblyComponents(); builder.Services.AddScoped(); builder.Services.AddCors(options => @@ -52,7 +53,8 @@ app.UseAntiforgery(); app.MapRazorComponents() - .AddInteractiveServerRenderMode(); - //.AddAdditionalAssemblies([typeof(MainLayout).Assembly]); + //.AddInteractiveServerRenderMode() + .AddInteractiveWebAssemblyRenderMode(); + //.AddAdditionalAssemblies(typeof(MainLayout).Assembly); app.Run(); diff --git a/src/UserComponents/__Main.razor b/src/UserComponents/__Main.razor index 0b8592f4..14af5b6e 100644 --- a/src/UserComponents/__Main.razor +++ b/src/UserComponents/__Main.razor @@ -1,4 +1,6 @@ @page "/__main" +@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false)) @namespace Try.UserComponents +@using Microsoft.AspNetCore.Components.Web @*This serves as a stub, which is then replaced with the user's components on the fly*@ \ No newline at end of file