11 lines
286 B
TypeScript
11 lines
286 B
TypeScript
// #docregion
|
|
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
@Pipe({ name: 'awesome' })
|
|
/** Precede the input string with the word "Awesome " */
|
|
export class AwesomePipe implements PipeTransform {
|
|
transform(phrase: string) {
|
|
return phrase ? 'Awesome ' + phrase : '';
|
|
}
|
|
}
|