@page "/" @inject HttpClient HttpClient @inject OrderState OrderState @inject NavigationManager NavigationManager @inject IJSRuntime JS
@code { List specials; Order Order => OrderState.Order; protected override async Task OnInitializedAsync() { specials = await HttpClient.GetFromJsonAsync>("specials"); } async Task RemovePizza(Pizza configuredPizza) { if (await JS.Confirm($"{configuredPizza.Special.Name} von der Bestellung entfernen?")) { OrderState.RemoveConfiguredPizza(configuredPizza); } } }