UNPKG

832 BTypeScriptView Raw
1import { ComponentFactoryResolver, ComponentRef } from '@angular/core';
2import { BasePortalHost, ComponentPortal, TemplatePortal } from './portal';
3/**
4 * A PortalHost for attaching portals to an arbitrary DOM element outside of the Angular
5 * application context.
6 *
7 * This is the only part of the portal core that directly touches the DOM.
8 */
9export declare class DomPortalHost extends BasePortalHost {
10 private _hostDomElement;
11 private _componentFactoryResolver;
12 constructor(_hostDomElement: Element, _componentFactoryResolver: ComponentFactoryResolver);
13 /** Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver. */
14 attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
15 attachTemplatePortal(portal: TemplatePortal): Map<string, any>;
16 dispose(): void;
17}