From bb842815824c12282ac004f17c54bc3e72513f4c Mon Sep 17 00:00:00 2001 From: Edouard Bozon Date: Tue, 24 Oct 2023 12:00:10 +0200 Subject: [PATCH] refactor: use HostBinding --- .../todo-mvc/src/app/todo-list.component.ts | 18 +++++++++--------- projects/todo-mvc/src/app/todo.component.ts | 18 +++++++++++------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/projects/todo-mvc/src/app/todo-list.component.ts b/projects/todo-mvc/src/app/todo-list.component.ts index 03716e8..c8945b4 100644 --- a/projects/todo-mvc/src/app/todo-list.component.ts +++ b/projects/todo-mvc/src/app/todo-list.component.ts @@ -1,4 +1,9 @@ -import { ChangeDetectionStrategy, Component, HostBinding, inject } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + HostBinding, + inject, +} from '@angular/core'; import { FormControl, ReactiveFormsModule } from '@angular/forms'; import { RxLet } from '@rx-angular/template/let'; import { TodoComponent } from './todo.component'; @@ -8,11 +13,7 @@ import { TodoService } from './todo.service'; standalone: true, selector: 'app-todo-list', changeDetection: ChangeDetectionStrategy.OnPush, - imports: [ - ReactiveFormsModule, - RxLet, - TodoComponent, - ], + imports: [ReactiveFormsModule, RxLet, TodoComponent], providers: [TodoService], styles: [ ` @@ -40,17 +41,16 @@ import { TodoService } from './todo.service'; (click)="todoService.actions.toggleAll()" /> - +
@for (todo of todos; track todo.id; let i = $index) { } - +