Skip to content

Commit

Permalink
ignoring the sln file
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpreston24 committed Mar 5, 2024
1 parent d5767d0 commit fc82ac5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nugs-net6.sln
logs
node_modules
wwwroot/lib
Expand Down
15 changes: 13 additions & 2 deletions Pages/Shared/Components/HydroCounter.cshtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
@model HydroCounter

<div>
<div class="flex flex-row">
Count: <strong>@Model.Count</strong>
<button hydro-on:click="@(() => Model.Add())">
@* x-on:click="localStorage.setItem('last-count',@Model.Count)" *@
<button
hydro-on:click="@(() => Model.Add())">
Add
</button>

<button hydro-on:click="@(() => Model.Reset())">
Reset
</button>

<div x-data="{ index: 0 }">
<strong x-text="index"></strong>
<button x-on:click="index = index + 1">Add</button>
</div>
</div>
5 changes: 5 additions & 0 deletions Pages/Shared/Components/HydroCounter.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ public void Add()
{
Count++;
}

public void Reset()
{
Count = 0;
}
}

0 comments on commit fc82ac5

Please sign in to comment.