title: AngularJS ng-click function with Angular Expression parameter returning a Syntax Error
body: <p>I am making a notes web app where I am using AngularJS framework.. I am succesfully displaying notes and I want to delete and update the notes using Unique_id .. I tried doing the ng-repeat with the notes uid in a font-awesome close icon using the a function on click </p>
  
  <p>Code is below: </p>
  
  <pre><code>&lt;div class="bodyContainer"&gt;
      &lt;div class="title"&gt;
          &lt;h3&gt;Notes&lt;i ng-click="updateFunc()" class="fa fa-refresh"&gt;&lt;/i&gt;&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="notesBox"&gt;
          &lt;div class="notes" ng-repeat="Notes in txtArray | limitTo: 5"&gt;
              &lt;remove-notes&gt;&lt;/remove-notes&gt;
              &lt;p class="notesTitle"&gt;{{Notes.notes_title}}&lt;/p&gt;
              &lt;p&gt;{{Notes.notes_text}}&lt;/p&gt;
          &lt;/div&gt;
          &lt;h3 class="emptyBox" ng-hide="txtArray.length &gt; 0"&gt;Write Your First Note!!&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="homePaging"&gt;&lt;a href="#notes"&gt;See more&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the Directive Code for the <code>&lt;remove-notes&gt;</code> directive:</p>
  
  <pre><code>diary.directive('removeNotes', function () {
  return {
      restrict: 'E',
      template: '&lt;i  class="fa fa-close fa-fw" ng-click="removeNote({{Notes.notes_uid}})"&gt;',
      link: function ($scope,element,attrs) {
          element.bind('click', function () {
              element.css('color','#19B5FE');
          })
      }
  }
  });
  </code></pre>
  
  <p>But When I click the Icon with the click event handler it gives me a parse error:</p>
  
  <p><img src="https://i.stack.imgur.com/JJPdA.png" alt="Error"></p>
  
  <p>When I check the Elements panel in the console.. It renders the value of the ang expression <code>{{Notes.notes_uid}}</code></p>
  
  <p>Is there any better way to implement the delete capability.. I just want to know how to pass the <code>notes_uid</code> to my backend php code in an Async way..</p>