Back to Abp

Blazor UI: Global Features

docs/en/framework/ui/blazor/global-features.md

10.3.0888 B
Original Source
json
//[doc-seo]
{
    "Description": "Learn how to use `GlobalFeatureManager` in Blazor to check and manage global features effectively for your applications."
}

Blazor UI: Global Features

GlobalFeatureManager allows you to check the global features in your Blazor applications.

Usage

html
@using Volo.Abp.GlobalFeatures

@* ... *@

@* Global Feature can be checked with feature name *@
@if(GlobalFeatureManager.Instance.IsEnabled("Ecommerce.Subscription"))
{
    <span>Ecommerce.Subscription is enabled.</span>
}

@* OR it can be checked with type *@

@if(GlobalFeatureManager.Instance.IsEnabled<EcommerceSubscriptionGlobalFeature>())
{
    <span>Ecommerce.Subscription is enabled.</span>
}
  • You can follow Check for a Global Feature section of the Global Features document to check global features in your C# code.