Member Junction
    Preparing search index...

    Generic base dialog component that can be used as a base for other dialogs by using this component as shown here in any other Angular component. The custom-actions slot shown below is entirely optional, if you don't need anything beyond OK/Cancel, you can leave this out entirely. You can also turn off the built-in OK and Cancel buttons using the ShowOKButton and ShowCancelButton properties.

    <mj-generic-dialog DialogTitle="Your Dialog Title" [DialogVisible]="YourVisibleStateVariable" (DialogClosed)="YourDialogClosedEventHandler($event)">

    Your content goes in here

    Implements

    • AfterContentInit
    Index

    Constructors

    Properties

    CancelButtonText: string = "Cancel"

    Text displayed on the Cancel button, defaults to "Cancel" if not provided

    customActions: ElementRef
    DialogClosed: EventEmitter<boolean> = ...

    Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button

    DialogHeight: string = '450px'

    Optional, height of the dialog in pixels or percentage

    DialogTitle: string = 'Default Title'

    Dialog title

    DialogWidth: string = '700px'

    Optional, width of the dialog in pixels or percentage

    OKButtonText: string = "OK"

    Text displayed on the OK button, defaults to "OK" if not provided

    RefreshData: EventEmitter<void> = ...

    This event is fired during the component lifecycle if the dialog wants the user of the dialog to refresh the data provided within its content.

    ShowCancelButton: boolean = true

    Ability to turn off the built-in Cancel button if it is not desired

    ShowOKButton: boolean = true

    Ability to turn off the built-in OK button if it is not desired

    Accessors

    • get DialogVisible(): boolean

      Determines if the dialog is visible or not, bind this to a variable in your containing component that is changed to true when you want the dialog shown. When the user closes the dialog this property will be set to false automatically.

      Returns boolean

    • set DialogVisible(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get HasCustomActions(): boolean

      Returns true if the dialog has custom actions defined in the custom-actions slot

      Returns boolean

    Methods

    • Internal event handler for the Cancel button, you can call this method directly if you want to simulate the user clicking on the Cancel button

      Returns void

    • Internal event handler for the OK button, you can call this method directly if you want to simulate the user clicking on the OK button

      Returns void

    • A callback method that is invoked immediately after Angular has completed initialization of all of the directive's content. It is invoked only once when the directive is instantiated.

      Returns void