mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
13 lines
278 B
Plaintext
13 lines
278 B
Plaintext
@page "/counter"
|
|
<h1>Counter</h1>
|
|
<p role="status">Current count: @currentCount</p>
|
|
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
|
@code {
|
|
private int currentCount = 0;
|
|
|
|
private void IncrementCount()
|
|
{
|
|
currentCount++;
|
|
}
|
|
}
|