File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ import {
66 APP_COMPONENT ,
77 APP_ID_RANDOM_PROVIDER
88} from './application_tokens' ;
9- import { Promise , PromiseWrapper , PromiseCompleter } from 'angular2/src/core/facade/async' ;
9+ import {
10+ Promise ,
11+ PromiseWrapper ,
12+ PromiseCompleter ,
13+ ObservableWrapper
14+ } from 'angular2/src/core/facade/async' ;
1015import { ListWrapper } from 'angular2/src/core/facade/collection' ;
1116import { Reflector , reflector } from 'angular2/src/core/reflection/reflection' ;
1217import { TestabilityRegistry , Testability } from 'angular2/src/core/testability/testability' ;
@@ -369,7 +374,8 @@ export class ApplicationRef_ extends ApplicationRef {
369374 constructor ( private _platform : PlatformRef_ , private _zone : NgZone , private _injector : Injector ) {
370375 super ( ) ;
371376 if ( isPresent ( this . _zone ) ) {
372- this . _zone . overrideOnTurnDone ( ( ) => this . tick ( ) ) ;
377+ ObservableWrapper . subscribe ( this . _zone . onTurnDone ,
378+ ( _ ) => { this . _zone . run ( ( ) => { this . tick ( ) ; } ) ; } ) ;
373379 }
374380 this . _enforceNoNewChanges = assertionsEnabled ( ) ;
375381 }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616import { applicationDomProviders } from 'angular2/src/core/application_common' ;
1717import { applicationCommonProviders } from 'angular2/src/core/application_ref' ;
1818import { compilerProviders } from 'angular2/src/core/compiler/compiler' ;
19+ import { ObservableWrapper } from 'angular2/src/core/facade/async' ;
1920
2021import { getComponentInfo , ComponentInfo } from './metadata' ;
2122import { onError , controllerKey } from './util' ;
@@ -342,7 +343,8 @@ export class UpgradeAdapter {
342343 '$rootScope' ,
343344 ( injector : angular . IInjectorService , rootScope : angular . IRootScopeService ) => {
344345 ng1Injector = injector ;
345- ngZone . overrideOnTurnDone ( ( ) => rootScope . $apply ( ) ) ;
346+ ObservableWrapper . subscribe ( ngZone . onTurnDone ,
347+ ( _ ) => { ngZone . run ( ( ) => rootScope . $apply ( ) ) ; } ) ;
346348 ng1compilePromise =
347349 UpgradeNg1ComponentAdapterBuilder . resolve ( this . downgradedComponents , injector ) ;
348350 }
You can’t perform that action at this time.
0 commit comments