angular-gantt-chart
Version:
This library can be used in Angular 2 application for creating responsive gantt chart. The chart component consists of inline SVG. The component accepts input data from child component using input decorator of Angular 2.
11 lines (10 loc) • 309 B
text/typescript
import {Pipe, PipeTransform} from '@angular/core'
({
name: 'truncate'
})
export class TruncatePipe {
transform(value: string, args:any[]) : string {
let limit = arguments.length > 0 ? parseInt(arguments[1]) : 10;
return value.length > limit ? value.substring(0, limit) + '...' : value;
}
}