AUR0904
Invalid dialog configuration. Specify the implementations for <IDialogService>, <IDialogGlobalSettings> and <IDialogDomRenderer>, or use the DialogConfigurationClassic export.
Error message
Invalid dialog configuration. Specify the implementations for <IDialogService>, <IDialogGlobalSettings> and <IDialogDomRenderer>, or use the DialogConfigurationClassic export.
Parameters
None
Error explanation
This error occurs when the DialogConfiguration object is used without providing the necessary implementations for the dialog system's core services (IDialogService, IDialogGlobalSettings, IDialogDomRenderer). This usually happens when you try to customize the dialog configuration without providing a base configuration or required dependencies.
Common causes
Calling
DialogConfiguration.register(container)without previously registeringIDialogService,IDialogGlobalSettings, andIDialogDomRenderer.Attempting to customize the dialog configuration using
DialogConfiguration.customize()without providing the necessary implementations in the second argument.
How to fix
Use the default configuration: If you don't need custom implementations, register the default configuration provided by the package:
import { DialogConfigurationClassic } from '@aurelia/dialog'; // In your main configuration container.register(DialogConfigurationClassic);Provide custom implementations: If you are customizing, ensure you provide implementations for all required services:
import { DialogConfiguration, /* your implementations */ } from '@aurelia/dialog'; container.register( DialogConfiguration.customize(settings => { // customize settings }, [ MyDialogService, // Must implement IDialogService MyDialogGlobalSettings, // Must implement IDialogGlobalSettings MyDialogDomRenderer // Must implement IDialogDomRenderer // ... other dependencies ]) );
Debugging tips
Check your application's main configuration file (e.g.,
main.tsor where you configure Aurelia).Verify that you are registering either
DialogConfigurationClassicor a fully customizedDialogConfigurationwith all required implementations.Ensure that the provided custom implementations are correctly registered in the container.
Last updated
Was this helpful?