fix(ngUpgrade): prevent digest already in progress (#9046)
This commit is contained in:
parent
57c9a07fff
commit
d1c989b8a5
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue