feat(upgrade): use ComponentFactory.inputs/outputs/ngContentSelectors
DEPRECATION: - the arguments `inputs` / `outputs` / `ngContentSelectors` of `downgradeComponent` are no longer used as Angular calculates these automatically now. - Compiler.getNgContentSelectors is deprecated. Use ComponentFactory.ngContentSelectors instead.
This commit is contained in:

committed by
Chuck Jazdzewski

parent
1171f91a80
commit
a3e32fb7e1
11
tools/public_api_guard/core/typings/core.d.ts
vendored
11
tools/public_api_guard/core/typings/core.d.ts
vendored
@ -193,7 +193,7 @@ export declare class Compiler {
|
||||
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
|
||||
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
|
||||
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
|
||||
getNgContentSelectors(component: Type<any>): string[];
|
||||
/** @deprecated */ getNgContentSelectors(component: Type<any>): string[];
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
@ -226,6 +226,15 @@ export interface ComponentDecorator {
|
||||
/** @stable */
|
||||
export declare abstract class ComponentFactory<C> {
|
||||
readonly abstract componentType: Type<any>;
|
||||
readonly abstract inputs: {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
readonly abstract ngContentSelectors: string[];
|
||||
readonly abstract outputs: {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
readonly abstract selector: string;
|
||||
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user