import { Component } from '@angular/core'; import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'toolCount', standalone: true }) class ToolCountPipe implements PipeTransform { transform(count: number): string { return count + (count === 1 ? ' tool' : ' tools'); } } @Component({ selector: 'bh-pipes', standalone: true, imports: [ToolCountPipe], template: `

{{ count | toolCount }}

`, }) export class App { count = 3; }