-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Hello guys,
Really nice content. On the Blazor trainning, I cannot finish the @layout part because of this. In the Checkout.razor
file, I have a property named isSubmitting for a button :
<button class="checkout-button btn btn-warning" @onclick="PlaceOrder" disabled=@isSubmitting>
and this is obviously resulting in an error there too.
@code {
Order Order => OrderState.Order;
async Task PlaceOrder()
{
isSubmitting = true;
var response = await HttpClient.PostAsJsonAsync($"{NavigationManager.BaseUri}orders", OrderState.Order);
var newOrderId = await response.Content.ReadFromJsonAsync<int>();
OrderState.ResetOrder();
NavigationManager.NavigateTo("/myorders");
}
}
Resulting in an error and I cannot do my dotnet watch
.
error CS0103: The name 'isSubmitting' does not exist in the current context [/home/computer/Documents/sidePrj/CsharpProjects/BlazingPizza/BlazingPizza.csproj]
Please shed some lights.
Metadata
Metadata
Assignees
Labels
No labels