Created
March 27, 2018 18:44
-
-
Save vmussak/c06c2ed808fc4bd5f206a232b35365f6 to your computer and use it in GitHub Desktop.
Contador com parametros
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 @onclick(IncrementCount(2))>Click me</button> | |
@functions { | |
int currentCount = 0; | |
Action IncrementCount(int a) | |
{ | |
return () => | |
{ | |
currentCount = currentCount + a; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment