From bf45d4bb0f6807d0ef391559d35dfd0ce7942e6b Mon Sep 17 00:00:00 2001 From: Sven Brodny Date: Fri, 16 Feb 2024 14:33:51 +0100 Subject: [PATCH] revert: pipe challenge changes --- apps/angular/pipe-easy/src/app/app.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/angular/pipe-easy/src/app/app.component.ts b/apps/angular/pipe-easy/src/app/app.component.ts index 73fef04..e7bd6b5 100644 --- a/apps/angular/pipe-easy/src/app/app.component.ts +++ b/apps/angular/pipe-easy/src/app/app.component.ts @@ -7,16 +7,15 @@ import { Component } from '@angular/core'; selector: 'app-root', template: `
- {{ numberedPerson(person, index) }} + {{ heavyComputation(person, index) }}
`, }) export class AppComponent { - // TODO: untyped array? persons = ['toto', 'jack', 'samuel', 'steve']; - // TODO: very heavy computation, replace this function with a pipe - numberedPerson(name: string, index: number) { - return `${index + 1}. ${name}`; + // TODO: very heavy computation + heavyComputation(name: string, index: number) { + return `${name} - ${index}`; } }