17 lines
401 B
Plaintext
17 lines
401 B
Plaintext
@using Microsoft.AspNetCore.Blazor
|
|
<h1>Counter</h1>
|
|
|
|
<!-- Note: passing 'Message' parameter with lowercase name to show it's case insensitive -->
|
|
<p>Current count: <MessageComponent message=@currentCount.ToString() /></p>
|
|
|
|
<button onclick="@IncrementCount">Click me</button>
|
|
|
|
@functions {
|
|
int currentCount = 0;
|
|
|
|
void IncrementCount(UIMouseEventArgs e)
|
|
{
|
|
currentCount++;
|
|
}
|
|
}
|