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

153
Views
cómo pasar el índice a un script en angularjs

Tengo el siguiente código angular.js:

 <table ng-repeat="item in myCollection"> <tr> <td> <span> <i uib-popover-template="'myPopoverTemplate'" <!--I want to pass $index to myPopoverTemplate--> popover-trigger="mouseenter" type="button"></i> <strong>{{item.Amount}}</strong> </span> </td> </tr> </table> <script type="text/ng-template" id="myPopoverTemplate"> <p>{{myCollection[...].reference}}</p> <!--pass index to here--> </script>

Básicamente, quiero pasar el índice a un script. Si no pude hacerlo, ¿cómo puedo modificar el código base para que funcione?

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

0

Puede mover el código de la plantilla al bloque ng-repeat .

 <table ng-repeat="item in myCollection"> <tr> <td> <span> <i uib-popover-template="'myPopoverTemplate'" popover-trigger="mouseenter" type="button"></i> <strong>{{item.Amount}}</strong> </span> </td> </tr> <script type="text/ng-template" id="myPopoverTemplate"> <p>{{item.reference}}</p> </script> </table>

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!