fix(datepicker): use correct viewContainerRef for dialog. (#6026)

This commit is contained in:
mmalerba
2017-07-27 09:43:01 -07:00
committed by Andrew Seguin
parent 3cb394512a
commit 08037f966b
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import {Component} from '@angular/core';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MdDatepickerInputEvent} from '@angular/material';
@@ -7,6 +7,7 @@ import {MdDatepickerInputEvent} from '@angular/material';
selector: 'datepicker-demo',
templateUrl: 'datepicker-demo.html',
styleUrls: ['datepicker-demo.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DatepickerDemo {
touch: boolean;
-1
View File
@@ -282,7 +282,6 @@ export class MdDatepicker<D> implements OnDestroy {
/** Open the calendar as a dialog. */
private _openAsDialog(): void {
this._dialogRef = this._dialog.open(MdDatepickerContent, {
viewContainerRef: this._viewContainerRef,
direction: this._dir ? this._dir.value : 'ltr'
});
this._dialogRef.afterClosed().subscribe(() => this.close());