File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change
1
+ < div >
2
+ < button (click) ="previousClicked('year') "> <<</ button >
3
+ < button (click) ="previousClicked('month') "> <</ button >
4
+ {{periodLabel}}
5
+ < button (click) ="nextClicked('month') "> ></ button >
6
+ < button (click) ="nextClicked('year') "> >></ button >
7
+ </ div >
Original file line number Diff line number Diff line change @@ -48,16 +48,11 @@ export class DatepickerDemo {
48
48
49
49
// Custom header component for datepicker
50
50
@Component ( {
51
+ moduleId : module . id ,
51
52
selector : 'custom-header' ,
52
- template : `
53
- <div>
54
- <button (click)="previousClicked('year')"><<</button>
55
- <button (click)="previousClicked('month')"><</button>
56
- {{periodLabel}}
57
- <button (click)="nextClicked('month')">></button>
58
- <button (click)="nextClicked('year')">>></button>
59
- </div>
60
- `
53
+ templateUrl : 'custom-header.html' ,
54
+ styleUrls : [ ] ,
55
+ changeDetection : ChangeDetectionStrategy . OnPush ,
61
56
} )
62
57
export class CustomHeader < D > {
63
58
constructor ( @Host ( ) private _calendar : MatCalendar < D > ,
You can’t perform that action at this time.
0 commit comments