I would like to find out how I can pass a parameter that was dynamically created using ng-repeat back to the controller by calling a controller function.
Currently when I call showItem('{{item.item_id}}'); I see {{item.item_id}} in my controller function. If I leave the parenthesis off, it seems like the function is not being called (no output in console.log).
$scope.showItem = function(itemId) {
console.log('show item '+itemId);
}
<ul ng-repeat="items in data">
<li>
<a ng-click="showItem('{{items.item_id}}')" href="javascript:void(0);" >
{{items.name}}
</a>
</li>
</ul>