@@ -17,7 +17,6 @@ import {
17
17
ChangeDetectorRef ,
18
18
ViewChild ,
19
19
ViewEncapsulation ,
20
- ChangeDetectionStrategy ,
21
20
} from '@angular/core' ;
22
21
import { animate , AnimationEvent , state , style , transition , trigger } from '@angular/animations' ;
23
22
import { DOCUMENT } from '@angular/platform-browser' ;
@@ -51,7 +50,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
51
50
templateUrl : 'dialog-container.html' ,
52
51
styleUrls : [ 'dialog.css' ] ,
53
52
encapsulation : ViewEncapsulation . None ,
54
- changeDetection : ChangeDetectionStrategy . OnPush ,
55
53
animations : [
56
54
trigger ( 'slideDialog' , [
57
55
// Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
@@ -119,13 +117,7 @@ export class MdDialogContainer extends BasePortalHost {
119
117
}
120
118
121
119
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 ) ;
129
121
}
130
122
131
123
/**
@@ -138,12 +130,7 @@ export class MdDialogContainer extends BasePortalHost {
138
130
}
139
131
140
132
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 ) ;
147
134
}
148
135
149
136
/** Moves the focus inside the focus trap. */
0 commit comments