i think the code had nested controllers, ng-repeat  is repeated the html 
tags so the controllers are repeated.

On Monday, March 2, 2015 at 5:45:02 PM UTC+5:30, Yashwanth Maheshwaram 
wrote:
>
> Hi Senthil,
> Tried that just now. That sounded to be valid but it didn't help. Any 
> other reasons that you can think of ?
>
> On Mon, Mar 2, 2015 at 5:35 PM, Senthil Kumar <mynam...@gmail.com 
> <javascript:>> wrote:
>
>> i am just guessing  this , 
>>
>>
>>               <div ng-repeat="venue in venues" ng-mouseover="" 
>> class="venue">
>>                      <div ng-controller="manageInfo" >
>>
>> the ng-controller is with in the repeat it is correct? 
>>
>> try to change 
>>                      <div ng-controller="manageInfo" >
>>               <div ng-repeat="venue in venues" ng-mouseover="" 
>> class="venue">
>>
>>
>>
>>
>> On Monday, March 2, 2015 at 5:03:41 PM UTC+5:30, Yashwanth Maheshwaram 
>> wrote:
>>>
>>> I'm trying to implement a shortlisting functionality in a case where I'm 
>>> using ng-click inside ng-repeat.
>>>
>>> While the $index is being displayed correctly outside the ng-click, 
>>> $index is only the index of the last object in the JSON array in all 
>>> the cases where the html is generated using ng-repeat.
>>>
>>> I was expecting the respective venue or venue.id to be passed as an 
>>> argument to shortlistThis(). I'm guessing that this could be an issue 
>>> related to event binding.
>>>
>>> Can someone help me understand what's going wrong here and probably a 
>>> better way to do this if possible.
>>>
>>> I did try checking this Bind ng-model name and ng-click inside 
>>> ng-repeat in angularjs 
>>> <http://stackoverflow.com/questions/21385164/bind-ng-model-name-and-ng-click-inside-ng-repeat-in-angularjs>
>>>  The 
>>> fiddle here works just fine but, mine doesn't.
>>>
>>> Here's a fiddle that you can look into. Just zoom out a bit, click on 
>>> any name on the left pane and then, hit the shortlist button to see an 
>>> alert. The alert value is 7 in all the cases.
>>>
>>> http://jsfiddle.net/yashwanthm/mos9rvvs/
>>>
>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/angular/3tvQsFvXYc8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> angular+u...@googlegroups.com <javascript:>.
>> To post to this group, send email to ang...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
>
> Cheers!
>
> Yashwanth Maheshwaram
>
>
>
>
> <http://t.signalecinque.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3MhNxFVRYC3-7fcz6YW7fsFDW56dVFKdrV0W802?t=https%3A%2F%2Ftwitter.com%2Fst_sting&si=5615883633295360&pi=f165ae9d-9255-41ba-8452-96564d492861>
>   
> <http://t.signalecinque.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3MhNxFVRYC3-7fcz6YW7fsFDW56dVFKdrV0W802?t=http%3A%2F%2Fin.linkedin.com%2Fin%2Fmyashwanth&si=5615883633295360&pi=f165ae9d-9255-41ba-8452-96564d492861>
>
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to