I make code that popup tooltip if there are overflow in the element and dont show tooltip if there are no overflow
<div class="title">
<div #titleElement class="ttt" [innerHtml]="title" data-toggle="tooltip"
data- placement="bottom" [title]=isOverflown(titleElement)?title:null></div>
</div>
type script code :
isOverflown(titleElement) {
return titleElement.scrollHeight > titleElement.clientHeight ||
titleElement.scrollWidth > titleElement.clientWidth ;
}
but just if the element has overflow it's case console error : Expression has changed after it was checked