(component: Type<T> & Type<Dialog<R>>, options?: ModalOptions<T>) => Observable<R | undefined>Create a modal from a component. The component must implement the Dialog interface. Additionally, the component should include templates for the title and the buttons to be displayed in the modal dialog. See example:
Example
Example
(config: DialogConfig<T>) => Observable<T | undefined>Displays a modal dialog with the provided title, body and buttons.
Any component intended to be used with the ModalService.fromComponent() method must implement this interface.
Configures a generic modal dialog.
Options to configure the behaviour of the modal.
'sm' | 'md' | 'lg' | 'xl'Sets the width of the dialog
'top' | 'center' | 'bottom'Sets the vertical alignment of the dialog
booleanWhen true, the "x" icon is shown and clicking it or the mask will close the dialog
Partial<T>Values to be passed directly to the component being instantiated inside the dialog.
Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team