LoadingModal displays a loading spinner and a customizable "Loading..." text as an overlay.

app-loading-modal

true

CommonModule

  • isVisible (boolean): Controls the visibility of the modal overlay. Default is false.
  • backgroundColor (string): Background color of the modal overlay. Default is 'rgba(0, 0, 0, 0.5)'.
  • displayColor (string): Color of the loading text. Default is 'white'.
  • modalContainerStyle (object): Computed styles for the modal container.
  • modalContentStyle (object): Computed styles for the modal content.
  • spinnerContainerStyle (object): Computed styles for the spinner container.
  • loadingTextStyle (object): Computed styles for the loading text.
<app-loading-modal
[isVisible]="true"
[backgroundColor]="'rgba(0, 0, 0, 0.5)'"
[displayColor]="'white'">
</app-loading-modal>
  • .spinner: Styles for the loading spinner.
  • @keyframes spin: Keyframes for the spinner rotation animation.
  • .modal-content: Styles for the modal content container.
  • .loading-text: Styles for the loading text.

Accessors

  • get modalContainerStyle(): {
        position: string;
        top: string;
        left: string;
        width: string;
        height: string;
        backgroundColor: undefined | string;
        display: string;
        alignItems: string;
        justifyContent: string;
        zIndex: string;
    }
  • Returns {
        position: string;
        top: string;
        left: string;
        width: string;
        height: string;
        backgroundColor: undefined | string;
        display: string;
        alignItems: string;
        justifyContent: string;
        zIndex: string;
    }

    • position: string
    • top: string
    • left: string
    • width: string
    • height: string
    • backgroundColor: undefined | string
    • display: string
    • alignItems: string
    • justifyContent: string
    • zIndex: string
  • get modalContentStyle(): {
        backgroundColor: undefined | string;
        borderRadius: string;
        padding: string;
        maxWidth: string;
        textAlign: string;
    }
  • Returns {
        backgroundColor: undefined | string;
        borderRadius: string;
        padding: string;
        maxWidth: string;
        textAlign: string;
    }

    • backgroundColor: undefined | string
    • borderRadius: string
    • padding: string
    • maxWidth: string
    • textAlign: string

Constructors

Properties

isVisible: boolean = false
backgroundColor?: string = 'rgba(0, 0, 0, 0.5)'
displayColor?: string = 'white'