Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.3 KB

README.md

File metadata and controls

39 lines (26 loc) · 1.3 KB

Modulight.UI.Blazor

Modulight provide a template project for Blazor hosting with Razor Component Client modules.

Use the package Modulight.UI.Blazor to try it.

It provides a navigation layout generated by client modules.

First implement a custom Blazor UI provider.

class CustomBlazorUIProvider : BlazorUIProvider
{
    public CustomBlazorUIProvider(IRazorComponentClientModuleCollection razorComponentClientModuleCollection) : base(razorComponentClientModuleCollection)
    {
    }
}

Then use the provider.

In WebAssembly

builder.ConfigureBlazorUI();

builder.Services.AddModules(builder =>
{
    builder.UseRazorComponentClientModules().AddBlazorUI<CustomBlazorUIProvider>();
});

A Sample startup.

In ASP.NET hosting

It needs the package Modulight.UI.Blazor.Hosting to support prerendering.

See README for details.