Created
May 15, 2019 20:19
-
-
Save cyberpirate92/e05903ae1ad610bd31b2c5f51c4899ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/" | |
@using TodoListApp.Data | |
@inject IJSRuntime JsRuntime; | |
<EditForm Model="@usernameFormModel" OnValidSubmit="@HandleValidSubmit"> | |
<DataAnnotationsValidator /> | |
<ValidationSummary /> | |
<InputText id="name" bind-Value="@usernameFormModel.Username" /> | |
<button type="submit">Fetch Repositories</button> | |
</EditForm> | |
@functions { | |
private UsernameFormModel usernameFormModel = new UsernameFormModel(); | |
private async Task HandleValidSubmit() { | |
await JsRuntime.InvokeAsync<int>("alert", usernameFormModel.Username); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment