0

Does anyone know why the tooltip here doesn't update? When I change the title, it should update. Is there something wrong? How can I solve this?

<div class="title" [innerHTML]="shortedTitle(page.title) | englishMarker" data-toggle="tooltip" title="{{page.title}}"></div>

enter image description here

here is the image of output

pushkin
  • 9,575
  • 15
  • 51
  • 95
ammar ammary
  • 119
  • 1
  • 11

1 Answers1

0

The tooltip needs to be updated programmatically once the title attribute has been changed, it will not automatically render changes made to the div.

Solution from this stackoverflow question;

$(element).attr('title', 'NEW_TITLE')
      .tooltip('fixTitle')
      .tooltip('show');
  • @ammarammary My apologies, I had included the wrong link in my answer; it has now been updated with the solution from the correct link, take a look at the answers in the link to see alternatives and get more context. – Nightfire445 Jun 21 '18 at 18:23
  • @ammarammary if you still require help please update your question or comment the problems you ran into on this answer. – Nightfire445 Jul 02 '18 at 17:03