Skip to content

Class: ConfirmBoxConfigModule

CostlyDeveloper edited this page Apr 21, 2021 · 6 revisions

Class: ConfirmBoxConfigModule

This is the module that ignites Confirm box dialog, its purpose is to show popup in a small dialog window in the middle of the screen. User can provide title, description and include buttons. Confirm box is available in predefined layout types (enums): DialogLayoutDisplay.

It is crucial for user to add this module in angular.app imports. Below is the example with (optional) default user configuration, that's what will be used if there is no local config when popup is evoked, that means it can be overridden directly when popup is evoked. For implementation look: IConfirmBoxUserConfig.

Example:

// app.module imports:
ConfirmBoxConfigModule.forRoot({
   ConfirmBoxCoreConfig: {
      Width: '700px',
      LayoutType: DialogLayoutDisplay.DANGER,
      ButtonPosition: 'center'
   },
   Message: {  // Optional default message object.
      Title: 'Default title',
      Description: 'Default description'
   },
   Buttons     : [
      new ButtonMaker('Ok', 'ok', ButtonLayoutDisplay.PRIMARY),
      new ButtonMaker('Cancel', 'cancel', ButtonLayoutDisplay.SECONDARY)
   ]
})

Constructors

constructor

+ new ConfirmBoxConfigModule(): ConfirmBoxConfigModule

Returns: ConfirmBoxConfigModule

Methods

forRoot

StaticforRoot(confirmBoxConfig?: IConfirmBoxUserConfig): ModuleWithProviders<ConfirmBoxConfigModule>

Parameters:

Name Type
confirmBoxConfig? IConfirmBoxUserConfig

Returns: ModuleWithProviders<ConfirmBoxConfigModule>

Clone this wiki locally