@page "/"
<input type="submit" @onclick="SetText"/> @text
@if (display == true)
{
<text>
<svg>
<path id="circle" d="m96.06557,140.16394c-27.62431,0 -50,-22.37569 -50,-50c0,-27.62431 22.37569,-50 50,-50c27.62431,0 48.85246,22.37569 48.85246,50c0,27.62431 -21.22815,50 -48.85246,50z" />
<text transform="rotate(155 95.4918 90.1639)">
<textPath xlink:href="#circle">
@text
</textPath>
</text>
</svg>
<svg>
<path id="circle" d="m96.06557,140.16394c-27.62431,0 -50,-22.37569 -50,-50c0,-27.62431 22.37569,-50 50,-50c27.62431,0 48.85246,22.37569 48.85246,50c0,27.62431 -21.22815,50 -48.85246,50z" />
<text transform="rotate(155 95.4918 90.1639)">
<textPath xlink:href="#circle">
EXPECTED RESULT
</textPath>
</text>
</svg>
</text>
}
@code {
public string? text;
private bool display = false;
protected override async Task OnInitializedAsync()
{
text = await GetText();
}
public Task<string> GetText()
{
return Task.FromResult("Loading...");
}
public void SetText() {
text = "LOADED";
display = true;
}
}