Complete the Design
Weâre able to list the tasks, but we also need the ability to add a new task and delete an existing task through the Angular UI. Letâs implement the feature to add a task next.
Design the Add Task Feature
To implement the feature to add a new task, we will need some new code in our component and in our service. The pipe will not change. We will also have to change the tasks.component.html file. Letâs start with the component-related work first.
Evolve the Component
To support the add task feature, the component should pass these tests:
- newTask should be initialized properly
- The component should properly convert newTask with no data to JSON
- The component should properly convert newTask with data to JSON
- addTask should register ...
Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.