@implements IDisposable; @inject IDialogService DialogService @inject IJSRuntime JsRuntime @inject NavigationManager NavigationManager @if (DialogService.IsVisible) {
@DialogService.GetDialogContents().Title
@DialogService.GetDialogContents().Message
Cancel @DialogService.GetDialogContents().ConfirmButtonLabel
} @code { protected override void OnInitialized() { base.OnInitialized(); DialogService.Subscribe(StateHasChanged); } void IDisposable.Dispose() { DialogService.Unsubscribe(StateHasChanged); } public void CloseDialog() { DialogService.Hide(); } }