-
-
Couldn't load subscription status.
- Fork 2.6k
Answer:5 #1382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Answer:5 #1382
Conversation
| vertical-align: middle; | ||
| margin-left: 4px; | ||
| } | ||
| `, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: always use changedetection.onpush That's an easy win
| @for (todo of todos; track todo.id) { | ||
| {{ todo.title }} | ||
| <button (click)="update(todo)">Update</button> | ||
| <app-loader></app-loader> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have a global loader.
What is I want a loader located at the todo component level when I update the todo, or delete it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented two kinds of loaders:
the global one:
<app-loader></app-loader>
and at the todo level as well:
@if (isProccessing()) { <span class="inline-spinner"> <mat-spinner [diameter]="16" [attr.data-testid]="'todo-spinner-' + todo().id" /> </span> }
| await waitForElementToBeRemoved(() => screen.getByTestId('todo-spinner-2')); | ||
| expect(screen.getAllByTestId('todo-item').length).toBe(1); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice set of tests 🔥
|
i'm not very familiar with the signal store, I'm pro tanstack 😅 but nice code and nice tests. great job |
No description provided.