Pipes let you change how data looks in the template, like formatting dates or uppercase text, without changing the original data in the component.
{{ birthday | date:'fullDate' }}What is the output behavior of the pipe?
The date pipe formats the date value for display. 'fullDate' shows the complete date in a readable format without changing the original date value.
Angular pipes use the pipe symbol (|) followed by the pipe name without parentheses. 'uppercase' is a built-in pipe.
import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'reverse' }) export class ReversePipe implements PipeTransform { transform(value: string): string { return value.split('').reverse().join(''); } }
The transform method calls reverse on the string but does not save or return the reversed result. It returns the original string unchanged.
Pure pipes run only when their input changes by value or reference. This avoids running the pipe on every change detection cycle.
