Working with menus
Menu management in the ABP Blazor UI is very similar to the ABP MVC/Razor Pages UI, which was covered in Chapter 12, Working with MVC/Razor Pages.
We use AbpNavigationOptions
to add contributors to the menu system. ABP executes all the contributors to build the menu dynamically. The startup solution includes a menu contributor and is added to AbpNavigationOptions
as per the following example:
Configure<AbpNavigationOptions>(options => { options.MenuContributors.Add(new DemoAppMenuContributor( context.Services.GetConfiguration())); });
DemoAppMenuContributor
is a class that implements the IMenuContributor
interface. The IMenuContributor
interface defines the ConfigureMenuAsync
method, which we should implement as shown in the following example:
public class DemoAppMenuContributor : IMenuContributor { public...