feat(challenge): add a pipe challenge serie

This commit is contained in:
thomas
2022-11-28 14:44:23 +01:00
parent aaeecf5f06
commit 2d61342db5
49 changed files with 1045 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { NgFor } from '@angular/common';
import { Component } from '@angular/core';
@Component({
standalone: true,
imports: [NgFor],
selector: 'app-root',
template: `
<div *ngFor="let person of persons; let index = index">
{{ heavyComputation(person, index) }}
</div>
`,
})
export class AppComponent {
persons = ['toto', 'jack'];
heavyComputation(name: string, index: number) {
// very heavy computation
return `${name} - ${index}`;
}
}