mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(datepicker): use correct viewContainerRef for dialog. (#6026)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user