diff --git a/packages/upgrade/src/dynamic/upgrade_adapter.ts b/packages/upgrade/src/dynamic/upgrade_adapter.ts index 9c7488f395..f7ab728c4d 100644 --- a/packages/upgrade/src/dynamic/upgrade_adapter.ts +++ b/packages/upgrade/src/dynamic/upgrade_adapter.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Compiler, CompilerOptions, Directive, Injector, NgModule, NgModuleRef, NgZone, StaticProvider, Testability, Type} from '@angular/core'; +import {Compiler, CompilerOptions, Injector, NgModule, NgModuleRef, NgZone, StaticProvider, Testability, Type, resolveForwardRef} from '@angular/core'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import * as angular from '../common/angular1'; @@ -574,7 +574,7 @@ export class UpgradeAdapter { {provide: $COMPILE, useFactory: () => ng1Injector.get($COMPILE)}, this.upgradedProviders ], - imports: [this.ng2AppModule], + imports: [resolveForwardRef(this.ng2AppModule)], entryComponents: this.downgradedComponents }; // At this point we have ng1 injector and we have prepared