diff --git a/modules/@angular/upgrade/src/angular_js.ts b/modules/@angular/upgrade/src/angular_js.ts index 02d6fd6d31..eeb3782bdd 100644 --- a/modules/@angular/upgrade/src/angular_js.ts +++ b/modules/@angular/upgrade/src/angular_js.ts @@ -26,6 +26,7 @@ export interface IRootScopeService { $apply(): any; $apply(exp: string): any; $apply(exp: Function): any; + $applyAsync(): any; $$childTail: IScope; $$childHead: IScope; $$nextSibling: IScope; diff --git a/modules/@angular/upgrade/src/upgrade_adapter.ts b/modules/@angular/upgrade/src/upgrade_adapter.ts index 6f93bb039a..522574c6d4 100644 --- a/modules/@angular/upgrade/src/upgrade_adapter.ts +++ b/modules/@angular/upgrade/src/upgrade_adapter.ts @@ -366,7 +366,7 @@ export class UpgradeAdapter { (injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => { ng1Injector = injector; ngZone.onMicrotaskEmpty.subscribe( - {next: (_) => ngZone.runOutsideAngular(() => rootScope.$apply())}); + {next: (_) => ngZone.runOutsideAngular(() => rootScope.$applyAsync())}); UpgradeNg1ComponentAdapterBuilder.resolve(this.downgradedComponents, injector) .then(resolve, reject); }