Permalink
Please sign in to comment.
Showing
with
17 additions
and 7 deletions.
@@ -1,17 +1,23 @@ | |||
@page "/counter" | |||
@page "/anothercounter" | |||
|
|||
<h1>Counter</h1> | |||
|
|||
<h1>@Title</h1> | |||
<p>@ChildContent</p> | |||
<p>Current count: @currentCount</p> | |||
|
|||
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button> | |||
|
|||
@functions { | |||
int currentCount = 0; | |||
[Parameter] | |||
private string Title { get; set; } = "Navigation Counter"; | |||
|
|||
void IncrementCount() | |||
{ | |||
currentCount++; | |||
} | |||
[Parameter] | |||
private RenderFragment ChildContent { get; set; } | |||
|
|||
int currentCount = 0; | |||
|
|||
void IncrementCount() | |||
{ | |||
currentCount++; | |||
} | |||
} |
0 comments on commit
f27aa81