Home I want to get the index of ng-repeat
Reply: 1

I want to get the index of ng-repeat

Benny B. Downs
1#
Benny B. Downs Published in 2017-12-07 19:25:54Z
<div ng-mouseenter="$ctrl.clicker($ctrl.adherence.events[$index].id)">
   <scheduled-event

      event="event"
      ng-repeat="event in $ctrl.adherence.events">
   </scheduled-event>

In the code I want to use the index of ng-repeat to get the index of an array however my index value using $index is not retreiving this value.

Kartik Puri
2#
Kartik Puri Reply to 2017-12-12 07:48:25Z

seems like you want to capture the $index and then fire your function based on that. You can have an

ng-click="clickFunction($index)"

and then have that function do rest of the work.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.299064 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO