source: trip-planner-front/node_modules/@angular/cdk/portal/dom-portal-outlet.d.ts@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, ApplicationRef, Injector } from '@angular/core';
9import { BasePortalOutlet, ComponentPortal, TemplatePortal, DomPortal } from './portal';
10/**
11 * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
12 * application context.
13 */
14export declare class DomPortalOutlet extends BasePortalOutlet {
15 /** Element into which the content is projected. */
16 outletElement: Element;
17 private _componentFactoryResolver;
18 private _appRef;
19 private _defaultInjector;
20 private _document;
21 constructor(
22 /** Element into which the content is projected. */
23 outletElement: Element, _componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _defaultInjector: Injector,
24 /**
25 * @deprecated `_document` Parameter to be made required.
26 * @breaking-change 10.0.0
27 */
28 _document?: any);
29 /**
30 * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
31 * @param portal Portal to be attached
32 * @returns Reference to the created component.
33 */
34 attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
35 /**
36 * Attaches a template portal to the DOM as an embedded view.
37 * @param portal Portal to be attached.
38 * @returns Reference to the created embedded view.
39 */
40 attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
41 /**
42 * Attaches a DOM portal by transferring its content into the outlet.
43 * @param portal Portal to be attached.
44 * @deprecated To be turned into a method.
45 * @breaking-change 10.0.0
46 */
47 attachDomPortal: (portal: DomPortal) => void;
48 /**
49 * Clears out a portal from the DOM.
50 */
51 dispose(): void;
52 /** Gets the root HTMLElement for an instantiated component. */
53 private _getComponentRootNode;
54}
55/**
56 * @deprecated Use `DomPortalOutlet` instead.
57 * @breaking-change 9.0.0
58 */
59export declare class DomPortalHost extends DomPortalOutlet {
60}
Note: See TracBrowser for help on using the repository browser.