10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
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 : '';
|
|
}
|
|
}
|