Created
January 3, 2020 10:53
-
-
Save 0x414c49/8fb6254096d1bf46c2acfa950e8b1f37 to your computer and use it in GitHub Desktop.
Blazor debug - 1
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() | |
{ | |
if(currentCount > 10) | |
currentCount = 0; | |
currentCount++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment