import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'SliceTextPipe' } ) export class SliceTextPipe implements PipeTransform { transform ( fullText ) { const sliceText = fullText . slice ( 0 , 20 ) + '...' ; return sliceText ; } }