fix(ngUpgrade): prevent digest already in progress (#9054)
fix(ngUpgrade): prevent digest already in progress
This commit is contained in:

committed by
Miško Hevery

parent
36d25f2a07
commit
7cefec77ef
@ -26,6 +26,7 @@ export interface IRootScopeService {
|
|||||||
$apply(): any;
|
$apply(): any;
|
||||||
$apply(exp: string): any;
|
$apply(exp: string): any;
|
||||||
$apply(exp: Function): any;
|
$apply(exp: Function): any;
|
||||||
|
$evalAsync(): any;
|
||||||
$$childTail: IScope;
|
$$childTail: IScope;
|
||||||
$$childHead: IScope;
|
$$childHead: IScope;
|
||||||
$$nextSibling: IScope;
|
$$nextSibling: IScope;
|
||||||
|
@ -366,7 +366,7 @@ export class UpgradeAdapter {
|
|||||||
(injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => {
|
(injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => {
|
||||||
ng1Injector = injector;
|
ng1Injector = injector;
|
||||||
ngZone.onMicrotaskEmpty.subscribe(
|
ngZone.onMicrotaskEmpty.subscribe(
|
||||||
{next: (_) => ngZone.runOutsideAngular(() => rootScope.$apply())});
|
{next: (_) => ngZone.runOutsideAngular(() => rootScope.$evalAsync())});
|
||||||
UpgradeNg1ComponentAdapterBuilder.resolve(this.downgradedComponents, injector)
|
UpgradeNg1ComponentAdapterBuilder.resolve(this.downgradedComponents, injector)
|
||||||
.then(resolve, reject);
|
.then(resolve, reject);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user