import { Component, Input } from '@angular/core'; @Component({ selector : 'custom-ellipsis', template: ` {{value}}`, styles : [ ` .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; width: 99%; text-align: left; } ` ] }) export class EllipsisComponent { @Input() value : string; @Input() id : string; }