File

overlay/src/overlay/overlay.service.ts

Description

OverlayService provides an overlay for displaying content on top of other content.

Example :
displayOverlay() {
  this.overlayRef = this.overlayService.open(CustomOverlayComponent, {
    data: {
      title: 'title',
    },
  });
  this.overlayRef.onClose.subscribe((myString) => {
    console.log('[OverlayDemo] onClose Subscription: ', myString);
  });
}

Import

Example :
 import { OverlayService } from '@talenra/components/overlay';

See OverlayRef

Index

Methods

Methods

open
open(componentType: Type, config?: OverlayConfig)

Opens an overlay with a given component type and configuration.

Example :
const overlayRef = this.overlayService.open(CustomComponentForOverlayComponent, {
  data: {
    title: 'Overlay Demo Title',
    subTitle: 'Overlay Demo Subtitle',
  },
});
Parameters :
Name Type Optional Description
componentType Type<any> No

The type of the component to load into the overlay.

config OverlayConfig Yes

The configuration for the overlay (can be null).

Returns : any

A reference to the newly-opened overlay.

Example :
const overlayRef = this.overlayService.open(CustomComponentForOverlayComponent, {
data: {
title: 'Overlay Demo Title',
subTitle: 'Overlay Demo Subtitle',
},
});

results matching ""

    No results matching ""