Skip to content

Instantly share code, notes, and snippets.

@JanneMattila
Created April 24, 2019 19:39
Show Gist options
  • Save JanneMattila/a76aac659e35db0bc8a5cf44984271a4 to your computer and use it in GitHub Desktop.
Save JanneMattila/a76aac659e35db0bc8a5cf44984271a4 to your computer and use it in GitHub Desktop.
Azure App Configuration
@page
@using Microsoft.Extensions.Options
@using FeatureTogglerApp.Features
@inject IOptionsSnapshot<FeatureOptions> featureOptions
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div class="text-center">
<h1 class="display-4">Welcome "@featureOptions.Value.AppName"</h1>
@if (featureOptions.Value.IndexPageCanvasEnabled)
{
<canvas id="canvas" width="200" height="200"></canvas>
<script src="~/js/IndexView.js" asp-append-version="true"></script>
}
else
{
<table border="1" width="200" height="200" align="center">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment