@@ -17,7 +17,6 @@ import {
1717 ChangeDetectorRef ,
1818 ViewChild ,
1919 ViewEncapsulation ,
20- ChangeDetectionStrategy ,
2120} from '@angular/core' ;
2221import { animate , AnimationEvent , state , style , transition , trigger } from '@angular/animations' ;
2322import { DOCUMENT } from '@angular/platform-browser' ;
@@ -51,7 +50,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
5150 templateUrl : 'dialog-container.html' ,
5251 styleUrls : [ 'dialog.css' ] ,
5352 encapsulation : ViewEncapsulation . None ,
54- changeDetection : ChangeDetectionStrategy . OnPush ,
5553 animations : [
5654 trigger ( 'slideDialog' , [
5755 // Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
@@ -119,13 +117,7 @@ export class MdDialogContainer extends BasePortalHost {
119117 }
120118
121119 this . _savePreviouslyFocusedElement ( ) ;
122-
123- const componentRef = this . _portalHost . attachComponentPortal ( portal ) ;
124-
125- // Ensure that the initial view change are picked up.
126- componentRef . changeDetectorRef . markForCheck ( ) ;
127-
128- return componentRef ;
120+ return this . _portalHost . attachComponentPortal ( portal ) ;
129121 }
130122
131123 /**
@@ -138,12 +130,7 @@ export class MdDialogContainer extends BasePortalHost {
138130 }
139131
140132 this . _savePreviouslyFocusedElement ( ) ;
141-
142- const locals = this . _portalHost . attachTemplatePortal ( portal ) ;
143-
144- this . _changeDetectorRef . markForCheck ( ) ;
145-
146- return locals ;
133+ return this . _portalHost . attachTemplatePortal ( portal ) ;
147134 }
148135
149136 /** Moves the focus inside the focus trap. */
0 commit comments