File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
10
10
ChangeDetectionStrategy ,
11
11
ChangeDetectorRef ,
12
12
Component ,
13
- Host ,
14
13
Inject ,
15
14
ViewChild ,
16
15
Optional ,
@@ -69,10 +68,9 @@ export class DatepickerDemo {
69
68
export class CustomHeader < D > implements OnDestroy {
70
69
private _destroyed = new Subject < void > ( ) ;
71
70
72
- constructor ( @Host ( ) private _calendar : MatCalendar < D > ,
73
- private _dateAdapter : DateAdapter < D > ,
74
- @Inject ( MAT_DATE_FORMATS ) private _dateFormats : MatDateFormats ,
75
- cdr : ChangeDetectorRef ) {
71
+ constructor (
72
+ private _calendar : MatCalendar < D > , private _dateAdapter : DateAdapter < D > ,
73
+ @Inject ( MAT_DATE_FORMATS ) private _dateFormats : MatDateFormats , cdr : ChangeDetectorRef ) {
76
74
_calendar . stateChanges
77
75
. pipe ( takeUntil ( this . _destroyed ) )
78
76
. subscribe ( ( ) => cdr . markForCheck ( ) ) ;
Original file line number Diff line number Diff line change 2
2
ChangeDetectionStrategy ,
3
3
ChangeDetectorRef ,
4
4
Component ,
5
- Host ,
6
5
Inject ,
7
6
OnDestroy
8
7
} from '@angular/core' ;
@@ -66,10 +65,9 @@ export class DatepickerCustomHeaderExample {
66
65
export class ExampleHeader < D > implements OnDestroy {
67
66
private destroyed = new Subject < void > ( ) ;
68
67
69
- constructor ( @Host ( ) private calendar : MatCalendar < D > ,
70
- private dateAdapter : DateAdapter < D > ,
71
- @Inject ( MAT_DATE_FORMATS ) private dateFormats : MatDateFormats ,
72
- cdr : ChangeDetectorRef ) {
68
+ constructor (
69
+ private calendar : MatCalendar < D > , private dateAdapter : DateAdapter < D > ,
70
+ @Inject ( MAT_DATE_FORMATS ) private dateFormats : MatDateFormats , cdr : ChangeDetectorRef ) {
73
71
calendar . stateChanges
74
72
. pipe ( takeUntil ( this . destroyed ) )
75
73
. subscribe ( ( ) => cdr . markForCheck ( ) ) ;
You can’t perform that action at this time.
0 commit comments