feat(ivy): generate .ngfactory stubs if requested (#25176)

Existing bootstrap code in the wild depends on the existence of
.ngfactory files, which Ivy does not need. This commit adds the
capability in ngtsc to generate .ngfactory files which bridge
existing bootstrap code with Ivy.

This is an initial step. Remaining work includes complying with
the compiler option to specify a generated file directory, as well
as presumably testing in g3.

PR Close #25176
This commit is contained in:
Alex Rickabaugh
2018-07-27 22:57:44 -07:00
committed by Kara Erickson
parent 728d98d3a9
commit 0822dc70f2
13 changed files with 338 additions and 10 deletions

View File

@ -116,6 +116,7 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<NgModuleAnalys
analysis: {
ngModuleDef, ngInjectorDef,
},
factorySymbolName: node.name !== undefined ? node.name.text : undefined,
};
}