Skip to content

Chapter 4 Section 3 #31

@RichLinnell

Description

@RichLinnell

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;

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions