1 | import { ModuleWithProviders, ComponentRef, TemplateRef, ComponentFactoryResolver, ViewContainerRef } from '@angular/core';
|
2 | import { Portal, TemplatePortal, ComponentPortal, BasePortalHost } from './portal';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class TemplatePortalDirective extends TemplatePortal {
|
13 | constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
|
14 | }
|
15 | /**
|
16 | * Directive version of a PortalHost. Because the directive *is* a PortalHost, portals can be
|
17 | * directly attached to it, enabling declarative use.
|
18 | *
|
19 | * Usage:
|
20 | * <template [portalHost]="greeting"></template>
|
21 | */
|
22 | export declare class PortalHostDirective extends BasePortalHost {
|
23 | private _componentFactoryResolver;
|
24 | private _viewContainerRef;
|
25 |
|
26 | private _portal;
|
27 | constructor(_componentFactoryResolver: ComponentFactoryResolver, _viewContainerRef: ViewContainerRef);
|
28 | portal: Portal<any>;
|
29 | /** Attach the given ComponentPortal to this PortlHost using the ComponentFactoryResolver. */
|
30 | attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
31 | /** Attach the given TemplatePortal to this PortlHost as an embedded View. */
|
32 | attachTemplatePortal(portal: TemplatePortal): Map<string, any>;
|
33 | /** Detatches the currently attached Portal (if there is one) and attaches the given Portal. */
|
34 | private _replaceAttachedPortal(p);
|
35 | }
|
36 | export declare class PortalModule {
|
37 | static forRoot(): ModuleWithProviders;
|
38 | }
|