1 | import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injector, ViewContainerRef, Type } from '@angular/core';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export declare class InjectionService {
|
10 | private applicationRef;
|
11 | private componentFactoryResolver;
|
12 | private injector;
|
13 | static globalRootViewContainer: ViewContainerRef;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | static setGlobalRootViewContainer(container: ViewContainerRef): void;
|
21 | private _container;
|
22 | constructor(applicationRef: ApplicationRef, componentFactoryResolver: ComponentFactoryResolver, injector: Injector);
|
23 | /**
|
24 | * Gets the root view container to inject the component to.
|
25 | *
|
26 | * @memberOf InjectionService
|
27 | */
|
28 | getRootViewContainer(): ViewContainerRef | ComponentRef<any>;
|
29 | /**
|
30 | * Overrides the default root view container. This is useful for
|
31 | * things like ngUpgrade that doesn't have a ApplicationRef root.
|
32 | *
|
33 | * @param container
|
34 | *
|
35 | * @memberOf InjectionService
|
36 | */
|
37 | setRootViewContainer(container: ViewContainerRef): void;
|
38 | /**
|
39 | * Gets the html element for a component ref.
|
40 | *
|
41 | * @param componentRef
|
42 | *
|
43 | * @memberOf InjectionService
|
44 | */
|
45 | getComponentRootNode(component: ViewContainerRef | ComponentRef<any>): HTMLElement;
|
46 | /**
|
47 | * Gets the root component container html element.
|
48 | *
|
49 | * @memberOf InjectionService
|
50 | */
|
51 | getRootViewContainerNode(component: ViewContainerRef | ComponentRef<any>): HTMLElement;
|
52 | /**
|
53 | * Projects the bindings onto the component
|
54 | *
|
55 | * @param component
|
56 | * @param options
|
57 | *
|
58 | * @memberOf InjectionService
|
59 | */
|
60 | projectComponentBindings(component: ComponentRef<any>, bindings: any): ComponentRef<any>;
|
61 | /**
|
62 | * Appends a component to a adjacent location
|
63 | *
|
64 | * @param componentClass
|
65 | * @param [options={}]
|
66 | * @param [location]
|
67 | *
|
68 | * @memberOf InjectionService
|
69 | */
|
70 | appendComponent<T>(componentClass: Type<T>, bindings?: any, location?: any): ComponentRef<any>;
|
71 | }
|