1 import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';
2 import {HighlightPipe} from "../../pipes/highlight/highlight-filter.pipe";
3 import * as _ from 'lodash';
6 selector : 'custom-ellipsis',
12 [innerHtml]="displayValue | safe : 'html'"
13 [tooltip-text]="value">
20 text-overflow: ellipsis;
21 display: inline-block;
27 providers : [HighlightPipe]
29 export class EllipsisComponent implements OnChanges{
30 @Input() value : string;
32 @Input() hightlight : string;
34 displayValue : string;
35 constructor(private _highlightPipe : HighlightPipe){
36 this.displayValue = this.value;
39 ngOnChanges(changes: SimpleChanges): void {
40 this.displayValue = this.value;
41 if(!_.isNil(this.hightlight)){
42 this.displayValue = this._highlightPipe.transform(this.value ,this.hightlight ? this.hightlight : '');