Skip to content

Commit

Permalink
Revert "chore(dialog): switch to OnPush change detection (angular#6287)"
Browse files Browse the repository at this point in the history
This reverts commit 72360e2.
  • Loading branch information
andrewseguin committed Aug 17, 2017
1 parent 72360e2 commit cbb5579
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/lib/dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
ChangeDetectorRef,
ViewChild,
ViewEncapsulation,
ChangeDetectionStrategy,
} from '@angular/core';
import {animate, AnimationEvent, state, style, transition, trigger} from '@angular/animations';
import {DOCUMENT} from '@angular/platform-browser';
Expand Down Expand Up @@ -51,7 +50,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
templateUrl: 'dialog-container.html',
styleUrls: ['dialog.css'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
trigger('slideDialog', [
// Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
Expand Down Expand Up @@ -119,13 +117,7 @@ export class MdDialogContainer extends BasePortalHost {
}

this._savePreviouslyFocusedElement();

const componentRef = this._portalHost.attachComponentPortal(portal);

// Ensure that the initial view change are picked up.
componentRef.changeDetectorRef.markForCheck();

return componentRef;
return this._portalHost.attachComponentPortal(portal);
}

/**
Expand All @@ -138,12 +130,7 @@ export class MdDialogContainer extends BasePortalHost {
}

this._savePreviouslyFocusedElement();

const locals = this._portalHost.attachTemplatePortal(portal);

this._changeDetectorRef.markForCheck();

return locals;
return this._portalHost.attachTemplatePortal(portal);
}

/** Moves the focus inside the focus trap. */
Expand Down

0 comments on commit cbb5579

Please sign in to comment.