I have the following angular.js code:
<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>
So basically I want to pass index to a script. If I couldn't do it, how can modify the code base to make it work?