35 lines
616 B
Plaintext
35 lines
616 B
Plaintext
|
@page "/counter"
|
||
|
@using UI_SequentMicrosystems.Services
|
||
|
|
||
|
@inject NavigationManager Navigator
|
||
|
@inject RTD8TMService _RTD8TMService
|
||
|
|
||
|
<PageTitle>Counter</PageTitle>
|
||
|
|
||
|
<h1>Counter</h1>
|
||
|
<h2>@Navigator.BaseUri --> @address</h2>
|
||
|
|
||
|
<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++;
|
||
|
|
||
|
}
|
||
|
private string address = "";
|
||
|
|
||
|
protected override void OnInitialized()
|
||
|
{
|
||
|
_RTD8TMService.SetAddress(Navigator.BaseUri);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|