feat(ivy): generate ngInjectorDef for @NgModule in AOT mode (#24632)

This change generates ngInjectorDef as well as ngModuleDef for @NgModule
annotated types, reflecting the dual nature of @NgModules as both compilation
scopes and as DI configuration containers.

This required implementing ngInjectorDef compilation in @angular/compiler as
well as allowing for multiple generated definitions for a single decorator in
the core of ngtsc.

PR Close #24632
This commit is contained in:
Alex Rickabaugh
2018-06-18 16:28:02 -07:00
committed by Jason Aden
parent 166d90d2a9
commit ae9418c7de
13 changed files with 174 additions and 44 deletions

View File

@ -99,7 +99,7 @@ export class NgtscProgram implements api.Program {
new ComponentDecoratorHandler(checker, reflector, scopeRegistry),
new DirectiveDecoratorHandler(checker, reflector, scopeRegistry),
new InjectableDecoratorHandler(reflector),
new NgModuleDecoratorHandler(checker, scopeRegistry),
new NgModuleDecoratorHandler(checker, reflector, scopeRegistry),
];
const compilation = new IvyCompilation(handlers, checker, reflector);