Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ import { Person } from './person.model';
selector: 'app-person-list',
imports: [CommonModule],
template: `
<div
*ngFor="let person of persons"
class="flex items-center justify-between border-b">
<h3>{{ person.name }}</h3>
<div class="flex gap-10 py-1">
<button
class="rounded-md border bg-blue-500 p-2 text-white"
(click)="update.emit(person.email)">
UPDATE
</button>
<button
class="rounded-md border bg-red-500 p-2 text-white"
(click)="delete.emit(person.email)">
DELETE
</button>
@for (person of persons; track person.email) {
<div class="flex items-center justify-between border-b">
<h3>{{ person.name }}</h3>
<div class="flex gap-10 py-1">
<button
class="rounded-md border bg-blue-500 p-2 text-white"
(click)="update.emit(person.email)">
UPDATE
</button>
<button
class="rounded-md border bg-red-500 p-2 text-white"
(click)="delete.emit(person.email)">
DELETE
</button>
</div>
</div>
</div>
}
`,
host: {
class: 'w-full flex flex-col',
Expand Down