Views
Import feature flag helpers globally
In your _ViewImports.cshtml
add the following line
@addTagHelper *, Microsoft.FeatureManagement.AspNetCore
Anywhere in your views you can now surround the parts of the page that make up the feature
<feature name="FeatureX">
<p>This can only be seen if 'FeatureX' is enabled.</p>
</feature>
or add display the contents conditionally if Any
or All
the referenced features are enabled
<feature name="ShoppingCart,Checkout,Donation" requirement="Any">
<div>checkout logic</div>
</feature>
Last updated
Was this helpful?