From dcae538e49ea4944077dd42bd494712e90bba3aa Mon Sep 17 00:00:00 2001 From: Maxime Delporte Date: Sun, 27 Apr 2025 08:25:03 -0300 Subject: [PATCH] Make tasksService property used inside new-task and task components private. --- src/app/tasks/new-task/new-task.component.ts | 2 +- src/app/tasks/task/task.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/tasks/new-task/new-task.component.ts b/src/app/tasks/new-task/new-task.component.ts index fbf5769..5e61832 100644 --- a/src/app/tasks/new-task/new-task.component.ts +++ b/src/app/tasks/new-task/new-task.component.ts @@ -19,7 +19,7 @@ export class NewTaskComponent { enteredSummary = ''; enteredDate = ''; - tasksService = inject(TasksService); + private tasksService = inject(TasksService); onCancel() { this.close.emit(); diff --git a/src/app/tasks/task/task.component.ts b/src/app/tasks/task/task.component.ts index 39ecc4e..ac774c1 100644 --- a/src/app/tasks/task/task.component.ts +++ b/src/app/tasks/task/task.component.ts @@ -15,7 +15,8 @@ import {TasksService} from '../tasks.service'; }) export class TaskComponent { @Input({ required: true }) task!: Task; - tasksService = inject(TasksService); + + private tasksService = inject(TasksService); onCompleteTask() { this.tasksService.removeTask(this.task.id);