feat(challenge 35): add challenge 35 about memoization

This commit is contained in:
thomas
2023-09-16 21:57:12 +02:00
parent c8fd152923
commit ea7eee2d4a
17 changed files with 355 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { generateList } from './generateList';
import { PersonListComponent } from './person-list.component';
@Component({
standalone: true,
imports: [PersonListComponent, NgIf],
selector: 'app-root',
template: `
<p>Performance is key!!</p>
<button
(click)="loadList = true"
class="border border-black p-2 rounded-md">
Load List
</button>
<app-person-list
*ngIf="loadList"
class="max-w-2xl"
[persons]="persons"
title="Persons" />
`,
})
export class AppComponent {
persons = generateList();
loadList = false;
}