@@ -16,8 +16,6 @@ import {
16
16
EventEmitter ,
17
17
Inject ,
18
18
Optional ,
19
- ChangeDetectionStrategy ,
20
- ChangeDetectorRef ,
21
19
} from '@angular/core' ;
22
20
import {
23
21
animate ,
@@ -51,7 +49,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
51
49
selector : 'md-dialog-container, mat-dialog-container' ,
52
50
templateUrl : 'dialog-container.html' ,
53
51
styleUrls : [ 'dialog.css' ] ,
54
- changeDetection : ChangeDetectionStrategy . OnPush ,
55
52
encapsulation : ViewEncapsulation . None ,
56
53
animations : [
57
54
trigger ( 'slideDialog' , [
@@ -107,7 +104,6 @@ export class MdDialogContainer extends BasePortalHost {
107
104
private _ngZone : NgZone ,
108
105
private _elementRef : ElementRef ,
109
106
private _focusTrapFactory : FocusTrapFactory ,
110
- private _changeDetectorRef : ChangeDetectorRef ,
111
107
@Optional ( ) @Inject ( DOCUMENT ) _document : any ) {
112
108
113
109
super ( ) ;
@@ -124,12 +120,7 @@ export class MdDialogContainer extends BasePortalHost {
124
120
}
125
121
126
122
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 ) ;
133
124
}
134
125
135
126
/**
@@ -142,12 +133,7 @@ export class MdDialogContainer extends BasePortalHost {
142
133
}
143
134
144
135
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 ) ;
151
137
}
152
138
153
139
/** Moves the focus inside the focus trap. */
0 commit comments