UNPKG

969 BTypeScriptView Raw
1import { ApplicationRef, ComponentFactoryResolver, ComponentRef } from '@angular/core';
2import { BasePortalHost, ComponentPortal } 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 private _appRef;
13 constructor(_hostDomElement: Element, _componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef);
14 /**
15 * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
16 * @param portal Portal to be attached
17 */
18 attachComponentPortal<T>(portal: ComponentPortal<T>, newestOnTop: boolean): ComponentRef<T>;
19 /** Gets the root HTMLElement for an instantiated component. */
20 private _getComponentRootNode;
21}