short.ts 225 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 import { PipeTransform, Pipe } from "@angular/core"; @Pipe ({ name: 'short' }) export class ShortPipe implements PipeTransform { transform(value: string): string { return value.substr(0, 25) + ' ...'; } }