Ok... pretty simple... I feel like an idiot.

Thank you Eric.

El miércoles, 19 de noviembre de 2014 16:26:54 UTC+1, Eric Eslinger 
escribió:
>
> Did you try a ng-click="showDetail(user.id)"? I am pretty sure the 
> ng-click syntax doesn't do brace interpolation.
>
> e
>
> On Wed Nov 19 2014 at 7:20:10 AM Carlos Saludes <[email protected] 
> <javascript:>> wrote:
>
>> Hi!
>>
>> I need to show a users list through restful. I got the json data and I 
>> use this code to show de content:
>>
>> <div ng-repeat="user in users"><a ng-click="showDetail($index)">{{ 
>> user.name }}</a></div>
>>
>> This code works fine, but when I click in "showDetail", I want to get the 
>> user id (user.id), not the index.
>>
>> If i set:
>>
>> <div ng-repeat="user in users"><a ng-click="showDetail({{ user.id 
>> }})">{{ user.name }}</a></div>
>>
>> The app says: you failed noob. How can I send the user.id on the 
>> showDetail function?
>>
>> Thank you.
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to