feat(ivy): support bootstrap in ngModuleDef (#25775)
The bootstrap property of @NgModule was not previously compiled by the compiler in AOT or JIT modes (in Ivy). This commit adds support for bootstrap. PR Close #25775
This commit is contained in:

committed by
Igor Minar

parent
a0c4b2d8f0
commit
13ccdfd89d
@ -35,7 +35,7 @@ export interface R3NgModuleMetadata {
|
||||
/**
|
||||
* An array of expressions representing the bootstrap components specified by the module.
|
||||
*/
|
||||
bootstrap: o.Expression[];
|
||||
bootstrap: R3Reference[];
|
||||
|
||||
/**
|
||||
* An array of expressions representing the directives and pipes declared by the module.
|
||||
@ -67,7 +67,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
|
||||
const {type: moduleType, bootstrap, declarations, imports, exports} = meta;
|
||||
const expression = o.importExpr(R3.defineNgModule).callFn([mapToMapExpression({
|
||||
type: moduleType,
|
||||
bootstrap: o.literalArr(bootstrap),
|
||||
bootstrap: o.literalArr(bootstrap.map(ref => ref.value)),
|
||||
declarations: o.literalArr(declarations.map(ref => ref.value)),
|
||||
imports: o.literalArr(imports.map(ref => ref.value)),
|
||||
exports: o.literalArr(exports.map(ref => ref.value)),
|
||||
|
Reference in New Issue
Block a user