UNPKG

1.38 kBTypeScriptView Raw
1import { ModuleWithProviders, TemplateRef, ViewContainerRef, OnInit, OnDestroy, ElementRef } from '@angular/core';
2import { Overlay } from './overlay';
3import { OverlayRef } from './overlay-ref';
4import { ConnectionPositionPair } from './position/connected-position';
5/**
6 * Directive applied to an element to make it usable as an origin for an Overlay using a
7 * ConnectedPositionStrategy.
8 */
9export declare class OverlayOrigin {
10 private _elementRef;
11 constructor(_elementRef: ElementRef);
12 readonly elementRef: ElementRef;
13}
14/**
15 * Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.
16 */
17export declare class ConnectedOverlayDirective implements OnInit, OnDestroy {
18 private _overlay;
19 private _overlayRef;
20 private _templatePortal;
21 origin: OverlayOrigin;
22 positions: ConnectionPositionPair[];
23 constructor(_overlay: Overlay, templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
24 readonly overlayRef: OverlayRef;
25 /** TODO: internal */
26 ngOnInit(): void;
27 /** TODO: internal */
28 ngOnDestroy(): void;
29 /** Creates an overlay and attaches this directive's template to it. */
30 private _createOverlay();
31 /** Destroys the overlay created by this directive. */
32 private _destroyOverlay();
33}
34export declare class OverlayModule {
35 static forRoot(): ModuleWithProviders;
36}