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:
Alex Rickabaugh
2018-08-28 14:19:33 -07:00
committed by Igor Minar
parent a0c4b2d8f0
commit 13ccdfd89d
4 changed files with 12 additions and 5 deletions

View File

@ -40,7 +40,7 @@ export function compileNgModuleDefs(moduleType: Type<any>, ngModule: NgModule):
if (ngModuleDef === null) {
const meta: R3NgModuleMetadata = {
type: wrap(moduleType),
bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(wrap),
bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(wrapReference),
declarations: declarations.map(wrapReference),
imports: flatten(ngModule.imports || EMPTY_ARRAY)
.map(expandModuleWithProviders)