Pipes
A pipe formats a value in the template: {{ dob | date:'dd MMM y' }}, {{ name | uppercase }}. Pure pipes run only when the input reference changes. Don’t put heavy search filters in a pipe on a huge list every keystroke unless you know the cost.
Custom pipe: @Pipe({ name: 'fail' }) transform(m: number) { return m < 40 ? 'Fail' : 'Pass'; }. Use {{ marks | fail }}. Trap: impure pipe that hits the network.
Exam tip
Built-in date pipe + one custom Pass/Fail.