In the Component definition the code reads as follows
constructor() {
const TasksService: TasksService = new TasksService();
this.tasks = taskService.taskStore;
this.today = new Date();
}
Firstly, the TaskService is defined as class TaskService so the first line of the constructor should read
const TasksService: TaskService = new TaskService();
Secondly, if we are going to call the const TasksService then the second line should read
this.tasks = TasksService.taskStore;
In the Component definition the code reads as follows
Firstly, the
TaskServiceis defined asclass TaskServiceso the first line of the constructor should readconst TasksService: TaskService = new TaskService();Secondly, if we are going to call the const TasksService then the second line should read
this.tasks = TasksService.taskStore;