ng-hotkeys
Version:
ng-hotkeys for Angular 14+
36 lines (35 loc) • 1.49 kB
TypeScript
import { ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, ApplicationRef, Injector } from '@angular/core';
import { BasePortalOutlet, ComponentPortal, TemplatePortal } from './portal';
/**
* @ignore
* A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
* application context.
*/
export declare class DomPortalOutlet extends BasePortalOutlet {
/** Element into which the content is projected. */
outletElement: Element;
private _componentFactoryResolver;
private _appRef;
private _defaultInjector;
constructor(
/** Element into which the content is projected. */
outletElement: Element, _componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _defaultInjector: Injector);
/**
* Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
* @param portal Portal to be attached
* @returns Reference to the created component.
*/
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
/**
* Attaches a template portal to the DOM as an embedded view.
* @param portal Portal to be attached.
* @returns Reference to the created embedded view.
*/
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
/**
* Clears out a portal from the DOM.
*/
dispose(): void;
/** Gets the root HTMLElement for an instantiated component. */
private _getComponentRootNode;
}