File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,6 @@ export class MatDialogContent {}
149
149
} )
150
150
export class MatDialogActions { }
151
151
152
- // TODO(crisbeto): this utility shouldn't be necessary anymore, because the dialog ref is provided
153
- // both to component and template dialogs through DI. We need to keep it around, because there are
154
- // some internal wrappers around `MatDialog` that happened to work by accident, because we had this
155
- // fallback logic in place.
156
152
/**
157
153
* Finds the closest MatDialogRef to an element by looking at the DOM.
158
154
* @param element Element relative to which to look for a dialog.
Original file line number Diff line number Diff line change @@ -292,21 +292,16 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
292
292
// Create a reference to the dialog we're creating in order to give the user a handle
293
293
// to modify and close it.
294
294
const dialogRef = new this . _dialogRefConstructor ( overlayRef , dialogContainer , config . id ) ;
295
- const injector = this . _createInjector < T > ( config , dialogRef , dialogContainer ) ;
296
295
297
296
if ( componentOrTemplateRef instanceof TemplateRef ) {
298
297
dialogContainer . attachTemplatePortal (
299
- new TemplatePortal < T > (
300
- componentOrTemplateRef ,
301
- null ! ,
302
- < any > {
303
- $implicit : config . data ,
304
- dialogRef,
305
- } ,
306
- injector ,
307
- ) ,
298
+ new TemplatePortal < T > ( componentOrTemplateRef , null ! , < any > {
299
+ $implicit : config . data ,
300
+ dialogRef,
301
+ } ) ,
308
302
) ;
309
303
} else {
304
+ const injector = this . _createInjector < T > ( config , dialogRef , dialogContainer ) ;
310
305
const contentRef = dialogContainer . attachComponentPortal < T > (
311
306
new ComponentPortal (
312
307
componentOrTemplateRef ,
You can’t perform that action at this time.
0 commit comments