I am trying to create a directive with the following functionality:
when the line breaks (no more space in the div), a tooltip will be created (with full text), and the text will be cropped and replaced with 3 dots.

all i have found so far, for a multi-line line, the best i got is:
CSS
.trim-info { max-width: 50px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 15px; position: relative; }
:
'<div class="trim-info" uib-tooltip="{{lineCtrl.text}}">{{lineCtrl.text}}</div>'
But, as you can see, the width is hard-coded. My question is how can I do this dynamically with the width of the parent.
source share