Exemplo n.º 1
0
 get: () => {
     if (ngModuleDef === null) {
         /** @type {?} */
         const meta = {
             type: wrap(type),
             bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(wrap),
             declarations: declarations.map(wrap),
             imports: flatten(ngModule.imports || EMPTY_ARRAY).map(expandModuleWithProviders).map(wrap),
             exports: flatten(ngModule.exports || EMPTY_ARRAY).map(expandModuleWithProviders).map(wrap),
             emitInline: true,
         };
         /** @type {?} */
         const res = compileR3NgModule(meta);
         ngModuleDef =
             jitExpression(res.expression, angularCoreEnv, `ng://${type.name}/ngModuleDef.js`);
     }
     return ngModuleDef;
 },
Exemplo n.º 2
0
 get: () => {
     if (ngInjectorDef === null) {
         /** @type {?} */
         const meta = {
             name: type.name,
             type: wrap(type),
             deps: reflectDependencies(type),
             providers: new WrappedNodeExpr(ngModule.providers || EMPTY_ARRAY),
             imports: new WrappedNodeExpr([
                 ngModule.imports || EMPTY_ARRAY,
                 ngModule.exports || EMPTY_ARRAY,
             ]),
         };
         /** @type {?} */
         const res = compileInjector(meta);
         ngInjectorDef =
             jitExpression(res.expression, angularCoreEnv, `ng://${type.name}/ngInjectorDef.js`);
     }
     return ngInjectorDef;
 },