fix: set field before using
This commit is contained in:
parent
660f251b40
commit
8c9b798bff
@ -45,13 +45,13 @@ export class ScheduleComponent {
|
|||||||
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
||||||
|
|
||||||
constructor(api: ScheduleService) {
|
constructor(api: ScheduleService) {
|
||||||
this.calculateCurrentWeek();
|
|
||||||
this.startTerm = new Date(1, 1, 1);
|
this.startTerm = new Date(1, 1, 1);
|
||||||
api.pairPeriod().subscribe(date => {
|
api.pairPeriod().subscribe(date => {
|
||||||
this.pairPeriods = date;
|
this.pairPeriods = date;
|
||||||
});
|
});
|
||||||
api.startTerm().subscribe(date => {
|
api.startTerm().subscribe(date => {
|
||||||
this.startTerm = date.date;
|
this.startTerm = date.date;
|
||||||
|
this.calculateCurrentWeek();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user