Last active
July 8, 2019 14:18
-
-
Save tuannguyenssu/ef91bdc688decc49e1f38193a83bc56c to your computer and use it in GitHub Desktop.
Blazor counter example
This file contains 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
@page "/counter" | |
<h1>Counter</h1> | |
<p>Current count: @currentCount</p> | |
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button> | |
@code { | |
private int currentCount = 0; | |
private void IncrementCount() | |
{ | |
currentCount++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment