@@ -573,7 +573,6 @@ export class ApplicationRef {
|
573 | 573 | private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = []; |
574 | 574 | private _views: InternalViewRef[] = []; |
575 | 575 | private _runningTick: boolean = false; |
576 | | -private _enforceNoNewChanges: boolean = false; |
577 | 576 | private _stable = true; |
578 | 577 | private _onMicrotaskEmptySubscription: Subscription; |
579 | 578 | |
@@ -602,8 +601,6 @@ export class ApplicationRef {
|
602 | 601 | private _exceptionHandler: ErrorHandler, |
603 | 602 | private _componentFactoryResolver: ComponentFactoryResolver, |
604 | 603 | private _initStatus: ApplicationInitStatus) { |
605 | | -this._enforceNoNewChanges = isDevMode(); |
606 | | - |
607 | 604 | this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({ |
608 | 605 | next: () => { |
609 | 606 | this._zone.run(() => { |
@@ -740,7 +737,9 @@ export class ApplicationRef {
|
740 | 737 | for (let view of this._views) { |
741 | 738 | view.detectChanges(); |
742 | 739 | } |
743 | | -if (this._enforceNoNewChanges) { |
| 740 | +// Note that we have still left the `isDevMode()` condition in order to avoid |
| 741 | +// creating a breaking change for projects that still use the View Engine. |
| 742 | +if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { |
744 | 743 | for (let view of this._views) { |
745 | 744 | view.checkNoChanges(); |
746 | 745 | } |
|