dom-portal-host.d.ts 969 B

123456789101112131415161718192021
  1. import { ApplicationRef, ComponentFactoryResolver, ComponentRef } from '@angular/core';
  2. import { 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. */
  9. export 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. }