### File

`projects/commons/src/lib/shared/overlay/overlay-container.ts`

### Index

###### Properties
Protected containerElement
###### Methods
Protected _createContainer Public getContainerElement

### Methods

Protected _createContainer
`_createContainer()`
Defined in projects/commons/src/lib/shared/overlay/overlay-container.ts:15
Returns : `void`

Public getContainerElement
`getContainerElement()`
Defined in projects/commons/src/lib/shared/overlay/overlay-container.ts:7
Returns : `HTMLElement`

### Properties

Protected containerElement
Type : `HTMLElement`
Defined in projects/commons/src/lib/shared/overlay/overlay-container.ts:5

    import { Injectable } from '@angular/core';

    @Injectable()
    export class OverlayContainer {
        protected containerElement: HTMLElement;

        public getContainerElement(): HTMLElement {
            if (!this.containerElement) {
                this._createContainer();
            }

            return this.containerElement;
        }

        protected _createContainer(): void {
            const container = document.createElement('div');
            container.classList.add('kdk-overlay-container');

            document.body.appendChild(container);

            this.containerElement = container;
        }
    }

# result-matching ""

# No results matching ""