font.ts
355 Bytes
import { PipeTransform, Pipe } from "@angular/core";
@Pipe ({
name: 'font'
})
export class PontPipe implements PipeTransform {
transform(value: string): string {
if(value === null){
value = '';
}
if (value.length > 19) {
return value.substr(19, 35) + ' ...';
}
return value;
}
}