mirror of
https://github.com/farcasclaudiu/AzureStaticWebApp-CSharp-SimpleDemo.git
synced 2026-06-22 07:01:03 +03:00
revert to basic
This commit is contained in:
+1
-14
@@ -1,5 +1,4 @@
|
||||
@page "/counter"
|
||||
@inject HttpClient Http
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
@@ -7,23 +6,11 @@
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
|
||||
<p>Message: @message</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="GetMessage">Salutation</button>
|
||||
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
private string message = "Hi!";
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
|
||||
private async Task GetMessage(){
|
||||
var temp = await Http.GetStringAsync("/api/JustHello?name=cloudies");
|
||||
message = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user