Skip to content

Commit 26be553

Browse files
committed
fix providers for lazy loaded compositions
Fixes #32
1 parent 38651a9 commit 26be553

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

packages/angular/preview/src/app/lazy-load/lazy-load.component.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,9 @@ export class LazyLoadComponent implements OnInit, OnDestroy {
4444
}
4545

4646
private insertModule(module: Type<any>): void {
47-
const moduleProps = Reflect.get(module, 'ɵmod') as ɵNgModuleDef<any>;
48-
if (moduleProps) {
49-
// we are using ivy & AOT
50-
this.insertComponent(this.maybeUnwrapFn(moduleProps.bootstrap));
51-
} else {
52-
// we are using view engine & JIT
53-
const ngModuleFactory = this.compiler.compileModuleSync(module);
54-
const moduleRef: any = ngModuleFactory.create(this.injector);
55-
this.insertComponent(this.maybeUnwrapFn(moduleRef._bootstrapComponents), moduleRef.componentFactoryResolver);
56-
}
47+
const ngModuleFactory = this.compiler.compileModuleSync(module);
48+
const moduleRef: any = ngModuleFactory.create(this.injector);
49+
this.insertComponent(this.maybeUnwrapFn(moduleRef._bootstrapComponents), moduleRef.componentFactoryResolver);
5750
}
5851

5952
private insertDocs(template: DocsTemplateAttrs) {

0 commit comments

Comments
 (0)