feat(ivy): support providers and viewProviders (#25803)
PR Close #25803
This commit is contained in:

committed by
Matias Niemelä

parent
9dc52d9d04
commit
b0476f308b
@ -80,6 +80,8 @@ export function compileComponent(type: Type<any>, metadata: Component): void {
|
||||
wrapDirectivesInClosure: false,
|
||||
styles: metadata.styles || [],
|
||||
encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated, animations,
|
||||
viewProviders: metadata.viewProviders ? new WrappedNodeExpr(metadata.viewProviders) :
|
||||
null
|
||||
},
|
||||
constantPool, makeBindingParser());
|
||||
const preStatements = [...constantPool.statements, ...res.statements];
|
||||
@ -180,6 +182,7 @@ function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMet
|
||||
typeSourceSpan: null !,
|
||||
usesInheritance: !extendsDirectlyFromObject(type),
|
||||
exportAs: metadata.exportAs || null,
|
||||
providers: metadata.providers ? new WrappedNodeExpr(metadata.providers) : null
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ export const angularCoreEnv: {[name: string]: Function} = {
|
||||
'ɵinjectAttribute': r3.injectAttribute,
|
||||
'ɵtemplateRefExtractor': r3.templateRefExtractor,
|
||||
'ɵNgOnChangesFeature': r3.NgOnChangesFeature,
|
||||
'ɵPublicFeature': r3.PublicFeature,
|
||||
'ɵProvidersFeature': r3.ProvidersFeature,
|
||||
'ɵInheritDefinitionFeature': r3.InheritDefinitionFeature,
|
||||
'ɵelementAttribute': r3.elementAttribute,
|
||||
'ɵbind': r3.bind,
|
||||
|
Reference in New Issue
Block a user