Created
January 16, 2020 15:59
-
-
Save kasunkv/755f78acea7a217646a6966089d05154 to your computer and use it in GitHub Desktop.
Using feature tag helper to wrap UI elements to hide behind feature flags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model HomeViewModel | |
@{ | |
ViewData["Title"] = "Home Page"; | |
} | |
<div class="text-center"> | |
<feature name="@Features.PromotionDiscounts" negate="true"><h1 class="display-4">Enjoy the latest music from your favorite artist</h1></feature> | |
<feature name="@Features.PromotionDiscounts"><h1 class="display-4">Enjoy 25% off for selected albums from your favorite artist</h1></feature> | |
... | |
<feature name="@Features.UserSuggestions"> | |
<partial name="_UserSuggestionsPartial" model="@Model.Suggestions" /> | |
</feature> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment