fix(core): remove NgZone_ and use NgZone instead

This commit is contained in:
vsavkin
2015-10-08 13:33:22 -07:00
parent bc8c194665
commit bba0248989
17 changed files with 166 additions and 198 deletions

View File

@ -3,7 +3,7 @@ import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {CONST, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {NgZone, NgZone_} from '../zone/ng_zone';
import {NgZone} from '../zone/ng_zone';
import {PromiseWrapper} from 'angular2/src/core/facade/async';
@ -21,12 +21,11 @@ export class Testability {
constructor(public _ngZone: NgZone) { this._watchAngularEvents(_ngZone); }
_watchAngularEvents(_ngZone: NgZone): void {
(<NgZone_>_ngZone).overrideOnTurnStart(() => { this._isAngularEventPending = true; });
(<NgZone_>_ngZone)
.overrideOnEventDone(() => {
this._isAngularEventPending = false;
this._runCallbacksIfReady();
}, true);
_ngZone.overrideOnTurnStart(() => { this._isAngularEventPending = true; });
_ngZone.overrideOnEventDone(() => {
this._isAngularEventPending = false;
this._runCallbacksIfReady();
}, true);
}
increasePendingRequestCount(): number {