title: Angular ng-repeat pass parameter to href link
body: <p>I have an existing grails app, built using GSPs and custom tagLibs. I need to incorporate some new code that uses AngularJS.
  I am new to AngularJS.</p>
  
  <p>Specifically, I have existing links that were generated with custom tags, such as:</p>
  
  <pre><code>&lt;g:custonSearchLink id="${ent.id}" &gt;
  </code></pre>
  
  <p>that evaluate to </p>
  
  <pre><code>&lt;a href="fullPath/controllerName/method/X", onclick="jQuery.ajax((type:'POST', url:'fullPath/controllerName/method/X', success:function(data,textStatus){jQuery('tableDiv').html(data);}, error:function(...)){}});return false" &gt;...
  </code></pre>
  
  <p>where X is the id param. I need to have the ng-repeat generate these links, and pass the "X" param value into the href and ajax url paths.</p>
  
  <p>So I understand that I can just use the nested curly braces " {{}}" to pass the X param from the object into the href string, </p>
  
  <pre><code>&lt;li ng-repeat="obj in myList track by obj.id" &gt;
    &lt;a href="fullPath/controllerName/method/{{obj.id}}"
  </code></pre>
  
  <p>but the onclick ajax url is nested in a single quoted string inside the onclick string. How can I pass the "X" param into that? 
  This does not work:</p>
  
  <pre><code>onclick="jQuery.ajax((type:'POST', url:'fullPath/controllerName/method/{{obj.id}}', 
  </code></pre>
  
  <p>Note that the "fullPath" in my case is "<a href="https://localhost:8453/" rel="nofollow">https://localhost:8453/</a>" since the server that is responding to the AJAX call is running on a different port than the server hosting the GSP.</p>