I'm stuck with something supposed simple: get the id of the checked radio button to give it to a function.
Please look at the code bellow:
In HTML :
<ul>
<div ng-repeat="r in rewards">
<li>
<div class="radio">
<input name="fakeform" type="radio" ng-value="r.id" ng-model="theId" />
<label for="radio">{{r.name}}</label>
</div>
</li>
</div>
</ul>
...
<button ng-click="use_reward(theId)">
OK
</button>
In controller.js
$scope.use_reward = function(reward_id){
alert(reward_id);
The alert box returns undefined instead of the id when the function is called.
Thanks for help.