Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
AngularJS - Tippy not functioning on last item in ng-repeat

I have an angularjs (unfortunately a necessity) component that renders in an ng-repeat.

<parent-li ng-repeat="item in layout">
 <component-with-tippy item="item"></component-with-tippy>
</parent-li>

The component has a tippy which I instantiate through the attribute configuration

<div>
 <button data-tippy-content="This is the button"></button>
</div>

The componentWithTippy.js has this in the controller:

// Tippy
  tippy('[data-tippy-content]',
    {
      trigger: 'mouseenter',
    }
  )

The problem I have is that the tippy works on all but the last item in the layout array. And if I add an item to the layout array the tippy then works on the previous last item but won't work on the new last item.

I've console.logged the items to see if the last one has any difference but it does not.

Is this an angularjs init thing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

What you want, is to call tippy after the component is ready. In angularjs you can achieve that in two ways:

Solution Ⅰ. Use $timeout without a delay:

$timeout(function () {
 tippy('[data-tippy]', {
  content: "I'm a Tippy tooltip!",
 });
});

Solution ⅠⅠ. Use .ready() which is provided by Angular's jqLite:

$element.ready(function () {
 tippy('[data-tippy]', {
  content: "I'm a Tippy tooltip!",
 });
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!