@@ -16,8 +16,6 @@ import {
1616 EventEmitter ,
1717 Inject ,
1818 Optional ,
19- ChangeDetectionStrategy ,
20- ChangeDetectorRef ,
2119} from '@angular/core' ;
2220import {
2321 animate ,
@@ -51,7 +49,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
5149 selector : 'md-dialog-container, mat-dialog-container' ,
5250 templateUrl : 'dialog-container.html' ,
5351 styleUrls : [ 'dialog.css' ] ,
54- changeDetection : ChangeDetectionStrategy . OnPush ,
5552 encapsulation : ViewEncapsulation . None ,
5653 animations : [
5754 trigger ( 'slideDialog' , [
@@ -107,7 +104,6 @@ export class MdDialogContainer extends BasePortalHost {
107104 private _ngZone : NgZone ,
108105 private _elementRef : ElementRef ,
109106 private _focusTrapFactory : FocusTrapFactory ,
110- private _changeDetectorRef : ChangeDetectorRef ,
111107 @Optional ( ) @Inject ( DOCUMENT ) _document : any ) {
112108
113109 super ( ) ;
@@ -124,12 +120,7 @@ export class MdDialogContainer extends BasePortalHost {
124120 }
125121
126122 this . _savePreviouslyFocusedElement ( ) ;
127- const componentRef = this . _portalHost . attachComponentPortal ( portal ) ;
128-
129- // Ensure that the initial view change are picked up.
130- componentRef . changeDetectorRef . markForCheck ( ) ;
131-
132- return componentRef ;
123+ return this . _portalHost . attachComponentPortal ( portal ) ;
133124 }
134125
135126 /**
@@ -142,12 +133,7 @@ export class MdDialogContainer extends BasePortalHost {
142133 }
143134
144135 this . _savePreviouslyFocusedElement ( ) ;
145- const locals = this . _portalHost . attachTemplatePortal ( portal ) ;
146-
147- // Ensure that the initial view change are picked up.
148- this . _changeDetectorRef . markForCheck ( ) ;
149-
150- return locals ;
136+ return this . _portalHost . attachTemplatePortal ( portal ) ;
151137 }
152138
153139 /** Moves the focus inside the focus trap. */
0 commit comments