Project

General

Profile

1
/**
2
 * @license
3
 * Copyright Google Inc. 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
 */
8
import { Injector } from '../di/injector';
9
import { Type } from '../type';
10
import { ComponentFactory, ComponentRef } from './component_factory';
11
import { NgModuleRef } from './ng_module_factory';
12
export declare function noComponentFactoryError(component: Function): Error;
13
export declare function getComponent(error: Error): Type<any>;
14
/**
15
 * @stable
16
 */
17
export declare abstract class ComponentFactoryResolver {
18
    static NULL: ComponentFactoryResolver;
19
    abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
20
}
21
export declare class CodegenComponentFactoryResolver implements ComponentFactoryResolver {
22
    private _parent;
23
    private _ngModule;
24
    private _factories;
25
    constructor(factories: ComponentFactory<any>[], _parent: ComponentFactoryResolver, _ngModule: NgModuleRef<any>);
26
    resolveComponentFactory<T>(component: {
27
        new (...args: any[]): T;
28
    }): ComponentFactory<T>;
29
}
30
export declare class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {
31
    private factory;
32
    private ngModule;
33
    constructor(factory: ComponentFactory<C>, ngModule: NgModuleRef<any>);
34
    readonly selector: string;
35
    readonly componentType: Type<any>;
36
    readonly ngContentSelectors: string[];
37
    readonly inputs: {
38
        propName: string;
39
        templateName: string;
40
    }[];
41
    readonly outputs: {
42
        propName: string;
43
        templateName: string;
44
    }[];
45
    create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
46
}
(3-3/11)