Currently, I am working with AngularJS and attempting to achieve the following:
<ul>
<li ng-repeat="thing in things">
<a id="mybutton" href="link{{thing.Id}}">Click</a>
<script type="text/javascript">
$("#mybutton").click(function()
{
alert("Id: " + {{thing.Id}});
});
</script>
</li>
</ul>
Unfortunately, both variations of alerting the Id value (using {{thing.Id}} or simply thing.Id) are resulting in errors ('unexpected token "{"' and 'thing is not defined'). Is there a way for me to properly access thing.Id within the scope of the repeater when executing JavaScript code?
On a practical note, my goal is to construct a URL based on this value along with some additional data using jQuery in JavaScript.